Networking
Showing results for 
Search instead for 
Do you mean 

Putty disconnects after few minutes

Occasional Contributor

Putty disconnects after few minutes

[ Edited ]

I am accessing servers through putty via ssh. For some servers if the putty session kept idle for few minutes it gives the message that "Network connection time out". Where as for other servers it does not give this kind of message after few hour idle time.

 

My question is how to make putty connection active after few hours idle time. All my server OS is hp-ux 11.23

Please help me in this regards.

 

 

P.S. This thread has been moved from HP-UX > General to HP-UX > networking. - Hp Forum moderator

avik
3 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: Putty disconnects after few minutes

Have you tried setting Putty's Connection > keepalives?

Occasional Contributor

Re: Putty disconnects after few minutes

For the servers where putty is active for few hours idle time

 

Putty's Connection > keepalives is 0

 

For the servers where putty is inactive for few minutes idle time

 

Putty's Connection > keepalives is also 0

avik
Honored Contributor

Re: Putty disconnects after few minutes

Hi,

 

You should check the timeout configs on your servers(sshd config), and firewalls.

 

You are probably working around a NAT translation or dynamic firewall rule timeout problem by making sure traffic is sent more often than the timeout. You could fix the problem for all long-lived TCP connections by adjusting the timeout on the firewall or router to a more reasonable value. Or modify in the sshd_config of the servers the Client Aliver interval:

 

 

ClienAliveInterval to 3600 (one hour).

$ sudo grep Alive /etc/ssh/sshd_config
ClientAliveInterval 3600
TCPKeepAliveyes 

 

Also Check again your putty config:

 

:: -> 'Connection'
::* check "Disable Nagle's algorithm (TCP_NODELAY option)"
::* check "Enable TCP keepalives (SO_KEEPALIVE option)"
:: -> 'Connection' -> 'SSH' -> 'X11'
::* check "Enable X11 forwarding"
::* Select "Enable MIT-Magic-Cookie-1"
:: Save the session

 

Windows?, no thanks