Effortless persistent SSH tunnels with embedded server for seamless connectivity
Effortless persistent SSH tunnels with embedded server for seamless connectivity
Rospo is a tool meant to create secure and reliable SSH tunnels. A single binary includes both client and server. It's meant to make SSH tunnels fun and understandable again
crypto/ssh package )human readable yaml config fileRospo actually full supports *nix oses and Windows 10+
Install rospo using Homebrew
brew install rospo| Platform | Architecture | URL |
|---|---|---|
| Microsoft Windows | amd64 | https://github.com/ferama/rospo/releases/latest/download/rospo-windows-amd64.exe |
You can use the docker ditribution where useful/needed
docker run ghcr.io/ferama/rospo --helpRospo supports keys based auth and password auth. Keys based one is always the preferred, so it is better if identity, authorized_keys etc are always correctly setup.
Usage example:
Starts an embedded ssh server and reverse proxy the port (2222 by default) to remote_server
$ rospo revshell user@server:portForwards the local 5000 port to the remote 6000 on the remote_server
$ rospo tun forward -l :5000 -r :6000 user@server:portGet more detailed help on each command runnig
$ rospo tun forward --help
$ rospo tun reverse --help
$ rospo sshd --helpFor more complex use cases and more options, you can use a config file
$ rospo run config.yamlLook at the config_template.yaml for all the available options.
Why use an embedded sshd server you might ask me. Suppose you have a Windows WSL instance that you want to access remotely without complicated setups on firewalls and other hassles and annoyances. With rospo you can do it in ONE simple step:
$ rospo revshell remote_ssh_serverThis command will run an embedded sshd server on your wsl instance and reverse proxy its port to the remote_ssh_server
The only assumption here is that you have access to remote_ssh_server.
The command will open a socket (on port 2222 by default) into remote_ssh_server that you can use to log back to WSL using a standard ssh client with a command like:
$ ssh -p 2222 localhostOr even better (why not!) with rospo you can reverse proxy a powershell. Using rospo for windows:
rospo.exe revshell remote_ssh_serverRospo support execution as a service on windows. This means that you can create a persistent tunnel that can be installed as a service and started automatically with the machine.
Let's do this with the Windows Remote Desktop service.
Create a rospo conf file like this:
sshclient:
server: your-rospo-or-sshd-server-uri:2222
identity: "c:\\absolute_path_to_your\\id_rsa"
known_hosts: "C:\\absolute_path_to_your\\known_hosts"
tunnel:
- remote: :3389
local: :3389 # the windows remote desktop port
forward: falseLaunch a terminal (powershell) with Administrative rights. You can then perform the following actions:
# create the rospo service
sc.exe create rospo start= auto DisplayName= Rospo binpath= "C:\rospo.exe run C:\conf.yaml"
# start service
sc.exe start rospo
# query service status
sc.exe query rospo
# stop and delete the service
sc.exe stop rospo; sc.exe delete rospoRospo supports multiple tunnels on the same ssh connetion. To exploit the full power of rospo for more complex cases, you should/need to use a scenario config file.
Let's define one. Create a file named config.yaml with the following contents
…Launch rospo using the config file instead of the cli parameters:
$ rospo run config.yamlWhat's happens here is that rospo will connect to remote_server_address through the jumphost_address server and will:
remote_server_address machineremote_server_address machineBut these are just an examples. Rospo can do a lot more.
Tunnels are fully secured using standard ssh mechanisms. Rospo will generate server identity file on first run and uses standard authorized_keys and user known_hosts files.
Rospo tunnel are monitored and kept up in the event of network issues.
No open issues yet, or sync has not completed.