Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

At work I have two machines: Windows XP and Ubuntu 11.04.

On my XP machine I use Putty to connect to some servers and can leave those windows open for weekends without them timing out.

However, when I connect tot the same serves from my Ubuntu box with Terminal, my connection times out before I even return from lunch or a meeting.

Is this by design or is there a setting i am missing?

share|improve this question
    
Do you have the Ubuntu machine set to automatically suspend after a period of inactivity? I recently ran into this problem with my new Windows 7 machine at work since it defaults to suspend after like half an hour, so when I got back from lunch and woke it up, the ssh connection was reset. –  psusi May 29 '11 at 3:07
    
It wasn't a sleep/suspend issue in this particular case. The only thing to occur is the screen saver turning on after a period of inactivity. –  Boston Bill Jun 1 '11 at 18:02

1 Answer 1

up vote 2 down vote accepted

I used to have the same issue with two Ubuntu boxes. There are settings in /etc/ssh/ssh_config that you can play with if you have root access, otherwise in your home folder .ssh/config try adding:
Host *
ServerAliveInterval 500
Otherwise there is a tool called "autossh" which will automatically reconnect on disconnect. You'll need to exchange keys if you want it to be fully automatic - and your session could get screwed up if you aren't using something like byobu or screen.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.