Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: SSH keeps disconnecting
PostPosted: Mon Aug 02, 2010 11:43 am 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
Hi

I connect to one of my linodes using PuTTY. It keeps disconnecting, usually after a few minutes. This can happen when a command is running, or when nothing is happening.

Any ideas how to keep it connected? It doesn't happen on my other linodes.

Thanks.


Top
   
 Post subject:
PostPosted: Mon Aug 02, 2010 3:22 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Does it say why it's disconnecting? Check your logs in /var/log for errors.


Top
   
 Post subject:
PostPosted: Mon Aug 02, 2010 3:25 pm 
Offline
Senior Member
User avatar

Joined: Sun Mar 23, 2008 10:10 am
Posts: 71
Website: http://frontseed.com/
You might want to check whether you have TCP keepalives enabled in PuTTY in your saved sessions as well as sshd configuration in your Linode (TCPKeepAlive option)


Top
   
 Post subject:
PostPosted: Mon Aug 02, 2010 4:18 pm 
Offline
Senior Member

Joined: Mon Jun 16, 2008 6:33 pm
Posts: 151
Possibly also set ClientAliveInterval (sshd_config) to something other than 0 (say, 60), depending on the results of:

obs wrote:
Does it say why it's disconnecting? Check your logs in /var/log for errors.


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2010 8:14 pm 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
Hi

There's nothing in /var/log/messages except:

Code:
Aug  3 08:04:19 li90-235 syslogd 1.4.1: restart.



I just turned on keepalives in PuTTY and will see if that helps.

What makes me suspicious is that my other linode has never had this issue. The main difference between them is this linode has multiple IP addresses, and my guess of the day is some configuration to do with this could be wrong. I've noticed when loading my munin graph page, sometimes a graph won't load, so perhaps some connections are getting mashed?

I'm using CentOS, and configured three scripts in /etc/sysconfig/network-scripts

Code:
cat ifcfg-eth0
# Linode Host Network Adapter
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=74.207.248.235
NETMASK=255.255.255.0
GATEWAY=74.207.248.1



Code:
cat ifcfg-eth0:0
# Linode Host Network Adapter
DEVICE=eth0:0
BOOTPROTO=none
ONBOOT=yes
IPADDR=173.230.155.74
NETMASK=255.255.255.0
GATEWAY=173.230.155.1



Code:
cat ifcfg-eth0:1
# Linode Host Network Adapter
DEVICE=eth0:1
BOOTPROTO=none
ONBOOT=yes
IPADDR=74.207.250.169
GATEWAY=74.207.250.1
NETMASK=255.255.255.0




Anything glaringly obvious, like I shouldn't have set gateways/should have etc?

Many thanks.


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2010 8:59 pm 
Offline
Linode Staff

Joined: Fri Jan 29, 2010 12:28 pm
Posts: 8
You will only want to set one default gateway for your connection. Typically we recommend setting up the default gateway that corresponds to your eth0 address. You will want to comment out or remove the gateways in your eth0:0 and eth0:1 configuration files. Having multiple gateways can lead to routing strangeness.


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2010 9:08 pm 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
Awesome thanks psandin, I'll give it a go and report back.


Top
   
 Post subject:
PostPosted: Sat Aug 14, 2010 1:45 pm 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
So I fixed the network scripts, but the problem still happens. I have PuTTY's keep-alive set at 10 seconds.


Top
   
 Post subject:
PostPosted: Mon Sep 13, 2010 8:10 am 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
I never did get this resolved. If anyone has any more ideas, please share. I'd like to avoid starting a new linode from scratch.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group