webssh

Web based ssh client https://github.com/huashengdun/webssh webssh.huashengdun.org/
git clone http://git.hanabi.in/repos/webssh.git
Log | Files | Refs | README | LICENSE

commit eb55ae2cceac286fb727d036eff838561e11dc6e
parent ffb776ca6cf0cefefed16fb36a4e161f46a724d7
Author: Sheng <webmaster0115@gmail.com>
Date:   Fri, 27 Apr 2018 00:04:48 +0800

Added setup.py setup.cfg

Diffstat:
MREADME.md | 19+++++++------------
Asetup.cfg | 7+++++++
Asetup.py | 46++++++++++++++++++++++++++++++++++++++++++++++
Mwebssh/__init__.py | 4++++
Awebssh/_version.py | 2++
5 files changed, 66 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md @@ -20,28 +20,26 @@ A simple web application to be used as an ssh client to connect to your ssh serv ### Instructions ``` git clone https://github.com/huashengdun/webssh.git -cd webssh -pip install -r requirements.txt -cd webssh -python main.py +pip install ./webssh/ +wssh ``` ### Options ``` # configure listen address and port -python main.py --address='0.0.0.0' --port=8000 +wssh --address='0.0.0.0' --port=8000 # configure missing host key policy -python main.py --policy=reject +wssh --policy=reject # configure logging level -python main.py --logging=debug +wssh --logging=debug # log to file -python main.py --log-file-prefix=main.log +wssh --log-file-prefix=main.log # more options -python main.py --help +wssh --help ``````` ### Nginx config example for running this app behind an nginx server @@ -61,6 +59,3 @@ location / { ### Tips * Try to use Nginx as a front web server (see config example above) and enable SSL, this will prevent your ssh credentials from being uncovered. Also afterwards the communication between your browser and the web server will be encrypted as they use secured websockets. * Try to use reject policy as the missing host key policy along with your verified known_hosts, this will prevent man-in-the-middle attacks. The idea is that it checks the system host keys file("~/.ssh/known_hosts") and the application host keys file("./known_hosts") in order, if the ssh server's hostname is not found or the key is not matched, the connection will be aborted. - -### Todo -Add more unittests diff --git a/setup.cfg b/setup.cfg @@ -0,0 +1,7 @@ +[metadata] +license_file = LICENSE + + +[flake8] +exclude = .git,build,dist,tests, __init__.py +max-line-length = 79 diff --git a/setup.py b/setup.py @@ -0,0 +1,46 @@ +import codecs +from setuptools import setup +from webssh._version import __version__ as version + + +starts = [u'### Preview', u'![Login]', u'![Terminal]'] + + +def starts_with(line): + for start in starts: + if line.startswith(start): + return True + + +with codecs.open('README.md', encoding='utf-8') as f: + long_description = ''.join(line for line in f if not starts_with(line)) + + +setup( + name='webssh', + version=version, + description='Web based ssh client', + long_description=long_description, + author='Shengdun Hua', + author_email='webmaster0115@gmail.com', + url='https://github.com/huashengdun/webssh', + packages=['webssh'], + entry_points=''' + [console_scripts] + wssh = webssh.main:main + ''', + license='MIT', + classifiers=[ + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], + install_requires=[ + 'tornado>=4.5.0', + 'paramiko>=2.3.1', + ], +) diff --git a/webssh/__init__.py b/webssh/__init__.py @@ -0,0 +1,4 @@ +from webssh._version import __version__, __version_info__ + + +__author__ = 'Shengdun Hua <webmaster0115@gmail.com>' diff --git a/webssh/_version.py b/webssh/_version.py @@ -0,0 +1,2 @@ +__version_info__ = (0, 1, 0) +__version__ = '.'.join(map(str, __version_info__))