I have a PI at home that creates an SSH tunnel to my VPS with autossh so I can access it from my VPS.
When I log in to my PI from my VPS the connection keeps closing (which makes it unusable). For example when I edit a file or even when I cd to another directory, the connection closes.
However if I ssh from my PI to my VPS, the ssh session keeps running and doesn't close.
I would like to have a reliable session from my VPS to my PI
Here is the command I use to connect to create the tunnel:
autossh -M 5233 -N -R 2514:localhost:22 vps -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -i /home/xbian/.ssh/id_rsa
and here is my ssh config on my PI sshd config