This tool helps to set up and manage a reverse ssh server.
To access computers in other networks via ssh, a reverse ssh tunnel can be set up so that the node establishes the connection to the server. The node establishes an SSH tunnel to the server. With this procedure, no NAT or port forwarding needs to be set up, even for nodes that are behind a firewall. Through the tunnel it is then possible to connect from the server to the ssh server on the node in order to log in there with a local user.
- ssh
- python3
- prettytable
- sudo
- ssh
- autossh
- sudo
- clone from github
- run server_preparation.sh
- install python3-prettytable
ctl.py
usage: ctl.py [-h] [--list] [-c CREATE] [-r REMOVE] [-a AUTOSSH]
optional arguments:
-h, --help show this help message and exit
--list List all configure Nodes
-c CREATE, --create CREATE
create a new Node
-r REMOVE, --remove REMOVE
remove a Node
-a AUTOSSH, --autossh AUTOSSH
autossh config for Node
Create a new Node with the name "ambrosia".
- create Node.
python3 ctl.py -c ambrosia
python3 ctl.py -a ambrosia
- copy node_install/ambrosia.tar.gz to Node
- or copy the node_install/ambrosia.copy to clipboard and paste is in cmd on Node
- run on Node
/bin/bash client_install.sh
python3 ctl.py --list
+----------+-------+--------------+------------------+
| nodename | port | connected | last connected |
+----------+-------+--------------+------------------+
| ambrosia | 10011 | i[CONNECTED] | i[LASTCONNECTED] |
| test1 | 10012 | i[CONNECTED] | i[LASTCONNECTED] |
| test2 | 10013 | i[CONNECTED] | i[LASTCONNECTED] |
+----------+-------+--------------+------------------+
Connect to the computer "ambrosia" with the user "pi"
on server:
# ssh <node user>@localhost -p <node port>
ssh pi@localhost -p 10011
Edit ~/.ssh/config on your pc
Host rSSHserver
HostName <server IP>
User <User on server>
Host Ambrosia
HostName localhost
ProxyJump rSSHserver
Port 10011 # node port
User pi
- 0.1
- Initial Release
This project is licensed under the MIT License - see the LICENSE.md file for details