I guess you ever wanted to connect to a Linux desktop machine via ssh, but you did not have a way to do it.
The Reverse SSH Tunneling allows you to connect to a computer for it which you do not have access via ssh. The connection is established opening up a tunnel through another computer for it which you really have a ssh access. It works really good with UNIX systems.
- Credentials ( username and password ).
- Public IP ( for remote connection via ssh ).
The following credentials are using just for this use case, remember the same is just a test for this documentation.
Username | Password | Remote IP |
---|---|---|
ubuntu | raring1304 | 138.47.99.99 |
ssh -R 19999:localhost:22 [email protected]
Note
Port 19999 can be any unused port.
ssh localhost -p 19999
Note
If you cannot connect to your destination machine, you can ask to someone else to open up a tunnel for you, then you could connect straight to your wished destination. In this case you should run
ssh destined-username@localhost -p 19999
.The destined-username will be your username on the destined machine you wanted to connect to.
Maybe you should enter your password, the same should belong to your destined-username.