Difference between revisions of "Ssh reverse tunnel"
From Teknologisk videncenter
(Created page with "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...") |
m |
||
Line 3: | Line 3: | ||
=Remote server= | =Remote server= | ||
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> | |
+ | ssh -o TCPKeepAlive-R 9000:localhost:22 heth@93.166.84.21 | ||
+ | </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-R 9000:localhost:22 heth@93.166.84.21