Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑天保
webssh
Commits
a7a3f466
Commit
a7a3f466
authored
Aug 29, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README
parent
4d77a6a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
19 deletions
+108
-19
README.md
README.md
+51
-8
README.rst
README.rst
+56
-10
login.png
preview/login.png
+0
-0
terminal.png
preview/terminal.png
+0
-0
_version.py
webssh/_version.py
+1
-1
No files found.
README.md
View file @
a7a3f466
...
...
@@ -8,9 +8,9 @@
## Introduction
A simple web application to be used as an ssh client to connect to your ssh servers. It is written in Python, base on tornado
and paramiko
.
A simple web application to be used as an ssh client to connect to your ssh servers. It is written in Python, base on tornado
, paramiko and xterm.js
.
```
+---------+ http +--------+ ssh +-----------+
+---------+ http +--------+ ssh +-----------+
| browser | <==========> | webssh | <=======> | ssh server|
+---------+ websocket +--------+ ssh +-----------+
```
...
...
@@ -31,21 +31,34 @@ A simple web application to be used as an ssh client to connect to your ssh serv
![
Terminal
](
https://github.com/huashengdun/webssh/raw/master/preview/terminal.png
)
### Requirement
### Requirement
s
*
Python 2.7/3.4+
###
Instructions
###
Quickstart
1.
Install this app
`pip install webssh`
2.
Start a webserver
`wssh`
3.
Open your browser, navigate to
`127.0.0.1:8888`
4.
Input your data, submit the form.
### Installation options
Install from the pypi repository, may not the latest version
```
pip install webssh
wssh
```
### Options
Install from the github repository, always the latest version
```
pip install https://github.com/huashengdun/webssh/archive/master.zip
```
### Server options
```
bash
# listen address and port
wssh
--address
=
'0.0.0.0'
--port
=
8000
...
...
@@ -62,6 +75,36 @@ wssh --log-file-prefix=main.log
wssh
--help
```
### Use console
```javascript
// set a new encoding for client to use
wssh.set_encoding(encoding);
// reset encoding to use the default one
wssh.reset_encoding();
// connect to your ssh server
wssh.connect(hostname, port, username, password, privatekey);
// without argument, wssh will use the form data to connect
wssh.connect();
// define a mapping object
var opts = {
hostname: 'hostname',
port: 'port',
username: 'username',
password: 'password',
privatekey: 'the private key text'
};
wssh.connect(opts);
// send a command to the server
wssh.send('ls -l');
```
### Tests
Use unittest to run all tests
...
...
@@ -76,7 +119,7 @@ python -m pytest tests
### An example of config for running this app behind an Nginx server
```
```
nginx
location
/
{
proxy_pass
http://127.0.0.1:8888
;
proxy_http_version
1
.1
;
...
...
README.rst
View file @
a7a3f466
...
...
@@ -7,11 +7,12 @@ Introduction
------------
A simple web application to be used as an ssh client to connect to your
ssh servers. It is written in Python, base on tornado and paramiko.
ssh servers. It is written in Python, base on tornado, paramiko and
xterm.js.
::
+---------+ http +--------+ ssh +-----------+
+---------+ http +--------+ ssh +-----------+
| browser | <==========> | webssh | <=======> | ssh server|
+---------+ websocket +--------+ ssh +-----------+
...
...
@@ -31,24 +32,39 @@ Preview
|Login| |Terminal|
Requirement
~~~~~~~~~~~
Requirement
s
~~~~~~~~~~~
~
- Python 2.7/3.4+
Instructions
~~~~~~~~~~~~
Quickstart
~~~~~~~~~~
1. Install this app ``pip install webssh``
2. Start a webserver ``wssh``
3. Open your browser, navigate to ``127.0.0.1:8888``
4. Input your data, submit the form.
Installation options
~~~~~~~~~~~~~~~~~~~~
Install from the pypi repository, may not the latest version
::
pip install webssh
wssh
Options
~~~~~~~
Install from the github repository, always the latest version
::
pip install https://github.com/huashengdun/webssh/archive/master.zip
Server options
~~~~~~~~~~~~~~
.. code:: bash
# listen address and port
wssh --address='0.0.0.0' --port=8000
...
...
@@ -64,6 +80,36 @@ Options
# more options
wssh --help
Use console
~~~~~~~~~~~
.. code:: javascript
// set a new encoding for client to use
wssh.set_encoding(encoding);
// reset encoding to use the default one
wssh.reset_encoding();
// connect to your ssh server
wssh.connect(hostname, port, username, password, privatekey);
// without argument, wssh will use the form data to connect
wssh.connect();
// define a mapping object
var opts = {
hostname: 'hostname',
port: 'port',
username: 'username',
password: 'password',
privatekey: 'the private key text'
};
wssh.connect(opts);
// send a command to the server
wssh.send('ls -l');
Tests
~~~~~
...
...
@@ -82,7 +128,7 @@ Use pytest to run all tests
An example of config for running this app behind an Nginx server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
.. code:: nginx
location / {
proxy_pass http://127.0.0.1:8888;
...
...
preview/login.png
View replaced file @
4d77a6a0
View file @
a7a3f466
67.7 KB
|
W:
|
H:
78.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
preview/terminal.png
View replaced file @
4d77a6a0
View file @
a7a3f466
82.9 KB
|
W:
|
H:
96.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
webssh/_version.py
View file @
a7a3f466
__version_info__
=
(
0
,
3
,
5
)
__version_info__
=
(
0
,
3
,
9
)
__version__
=
'.'
.
join
(
map
(
str
,
__version_info__
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment