1

I have been remotely connecting to my ubuntu dekstop at work using SSH, I have noticed that after some ideal time the connection hangs and on restarting the SSH, ssh does not identify my desktop on the remote side. Later I observed that the remote desktop usually hangs up when my ssh connection hangs up? Could anyone help with this? I usually forward ports in SSH as there is an intermediate server.

1 Answer 1

1

to prevent ssh hanging up on your, you can set up some things in your ssh setup.

edit/or create this file

pico ~/.ssh/config

add these lines

Host Remotehost
 Hostname myremotehost.com
 ServerAliveInterval 240

alternative you can make this rule for ALL your ssh connections like this

Host *
 ServerAliveInterval 240

if you are on windows, putty also have keep alive settings.

oh, and do not forget to set the correct permission for this config file like this:

chmod 600 ~/.ssh/config

source

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .