Top 30 SSH shenanigans

Good list of commands to be SSH 'Yoda'. I like the tunnels and screen the most in these. They have been so useful over the years, for development and troubleshooting.

SSH Shenanigans

Here is a short list that I use ofter:

 1# Copy SSH public key
 2$ ssh-copy-id user@host
 4# Alternative for ssh-copy-id
 5$ cat ~/.ssh/ | ssh user@machine “mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys”
 6# Start a tunnel local:2001 -> remote:80
 7$ ssh -N -L2001:localhost:80 somemachine
 9# Run a GUI app from remote machine
10$ ssh -fX <user>@<host> <program>
12# SSH to machien behind NAT
13$ ssh -NR

Click to Original Post

comments powered by Disqus