Difference between revisions of "Ssh reverse tunnel"
From Teknologisk videncenter
m |
m |
||
Line 4: | Line 4: | ||
To allow login without password create public/private rsa key pair and | To allow login without password create public/private rsa key pair and | ||
<source lang=bash> | <source lang=bash> | ||
− | ssh -o TCPKeepAlive-R 9000:localhost:22 heth@93.166.84.21 | + | ssh -o TCPKeepAlive=yes -R 9000:localhost:22 heth@93.166.84.21 |
</source> | </source> | ||
Revision as of 08:04, 28 June 2025
To ssh to a host behind a firewall that doesn't allow incoming connections, a reverse ssh tunnel can be created from the server to a known client host. The client host should have a static IP address or a DNS hostname.
Remote server
To allow login without password create public/private rsa key pair and
ssh -o TCPKeepAlive=yes -R 9000:localhost:22 heth@93.166.84.21