Secure Shell (SSH)
Topics: Network, Linux Shell
Secure Shell (SSH) provides encrypted remote access and supports authentication and port forwarding.
Authentication
Instead of public keys, using CA certificates is a good alternative.
Yubikey
Another way to authenticate is a security token like the popular Yubikey.
SSH tunnels
In OpenSSH, local port forwarding is configured using the -L option:
ssh -L 80:intra.example.com:80 gw.example.com
This example opens a connection to the gw.example.com jump server, and forwards any connection to port 80 on the local machine to port 80 on intra.example.com.
By default, anyone (even on different machines) can connect to the specified port on the SSH client machine. However, this can be restricted to programs on the same host by supplying a bind address:
ssh -L 127.0.0.1:80:intra.example.com:80 gw.example.com