This is an old revision of the document!
See Set Up SSH Keys.
ssh -v ...
Take care of both with this one-liner:
On the Client PC:
echo "Host * ServerAliveInterval 60 GSSAPIAuthentication=no" >> $HOME/.ssh/config
(be sure to copy and paste everything including the CRLF's and spaces)
If a permissions error is thrown:
chmod 600 /home/gcooper/.ssh/config
If you get an error message “unknown terminal type”, you can try specifying a different terminal like this:
TERM=xterm-color ssh -l username remote.host.name
Adjust your firewall first or you may lose access!
vim /etc/ssh/sshd_config Port 2222 service sshd restart
http://www.howtoforge.com/reverse-ssh-tunneling
http://www.alexonlinux.com/reverse-ssh-tunnel-or-connecting-to-computer-behind-nat-router
This technique is used to access an SSH host behind a NAT firewall using a middle-man PC with a static IP address.
On the middle-man host with a real static IP address:
On remote host (behind NAT) that you want to access:
ssh -R 22222:localhost:22 root@middleman
or if SSH is listening on a non-standard port:
ssh -R 22222:localhost:22 root@middleman -p 2222
From your workstation, connect through the middle-man PC:
ssh -p 22222 root@middleman
http://www.howtoforge.com/reverse-ssh-tunneling#comment-4762
Use AutoSSH to keep a tunnel up constantly.