mirror of https://github.com/huashengdun/webssh
Added setup.py setup.cfg
parent
ffb776ca6c
commit
eb55ae2cce
19
README.md
19
README.md
|
@ -20,28 +20,26 @@ A simple web application to be used as an ssh client to connect to your ssh serv
|
||||||
### Instructions
|
### Instructions
|
||||||
```
|
```
|
||||||
git clone https://github.com/huashengdun/webssh.git
|
git clone https://github.com/huashengdun/webssh.git
|
||||||
cd webssh
|
pip install ./webssh/
|
||||||
pip install -r requirements.txt
|
wssh
|
||||||
cd webssh
|
|
||||||
python main.py
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
```
|
```
|
||||||
# configure listen address and port
|
# 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
|
# configure missing host key policy
|
||||||
python main.py --policy=reject
|
wssh --policy=reject
|
||||||
|
|
||||||
# configure logging level
|
# configure logging level
|
||||||
python main.py --logging=debug
|
wssh --logging=debug
|
||||||
|
|
||||||
# log to file
|
# log to file
|
||||||
python main.py --log-file-prefix=main.log
|
wssh --log-file-prefix=main.log
|
||||||
|
|
||||||
# more options
|
# more options
|
||||||
python main.py --help
|
wssh --help
|
||||||
```````
|
```````
|
||||||
|
|
||||||
### Nginx config example for running this app behind an nginx server
|
### Nginx config example for running this app behind an nginx server
|
||||||
|
@ -61,6 +59,3 @@ location / {
|
||||||
### Tips
|
### 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 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.
|
* 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
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
[metadata]
|
||||||
|
license_file = LICENSE
|
||||||
|
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
exclude = .git,build,dist,tests, __init__.py
|
||||||
|
max-line-length = 79
|
|
@ -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',
|
||||||
|
],
|
||||||
|
)
|
|
@ -0,0 +1,4 @@
|
||||||
|
from webssh._version import __version__, __version_info__
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'Shengdun Hua <webmaster0115@gmail.com>'
|
|
@ -0,0 +1,2 @@
|
||||||
|
__version_info__ = (0, 1, 0)
|
||||||
|
__version__ = '.'.join(map(str, __version_info__))
|
Loading…
Reference in New Issue