unresponsive ssh sessions

Lanoxx lanoxx at gmx.net
Wed Apr 24 07:47:37 UTC 2013


This can ofter happen with cheap routers of if NAT is involved (probably 
the router doesnt keep the port mapping long enough).

The solution for me was to either change the server or client timeout to 
a high value:

man sshd_config:
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has
been received from the client, sshd(8) will send a message
through the encrypted channel to request a response from the
client. The default is 0, indicating that these messages will
not be sent to the client. This option applies to protocol ver‐
sion 2 only.


man ssh_config:
ServerAliveInterval
Sets a timeout interval in seconds after which if no data has been 
received from the server, ssh(1) will send a message through the 
encrypted channel to request a response from the server. The default is 
0, indicating that these messages will not be sent to the server, or 300 
if the BatchMode option is set. This option applies to protocol version 
2 only. ProtocolKeepAlives and SetupTimeOut are Debian-specific 
compatibility aliases for this option.

Cheers
Sebastian

On 24/04/13 00:18, Rajeev Prasad wrote:
> few more things:
> 1. my VM has private IP addr: 192.168.231.129
> 2. host machine is on another IP addr scheme (class C)
> 3. the ssh session hangs if no activity for 1-2 hours.
>
> ------------------------------------------------------------------------
> *From:* Rajeev Prasad <rp.neuli at yahoo.com>
> *To:* Ubuntu technical support not for general discussions 
> <ubuntu-users at lists.ubuntu.com>
> *Sent:* Tuesday, April 23, 2013 11:38 AM
> *Subject:* unresponsive ssh sessions
>
> I have ubuntu running in a VM on Win 7. problem is, my ssh connections 
> to remote host on ethernet LANs become unresponsive next day (or maybe 
> after some hours). I can see the window fine and if open another 
> session to the same host, i can see my old session on remote host 
> (with command w).
>
> I am guessing ti is because of limited RAM, but I am not sure. I do 
> not run any server App or big script program etc. on this VM, mainly 
> for ssh into remote hosts and run a few small scripts here and there.
>
>
>
> Win7 (host) details from Performance Monitor:
>
> ___with normal apps running on win7 and nothing unusual running on 
> ubuntu_VM___
>
> used physical memory: 74%
>
> Installed: 4096MB
> Total: 4046MB
> Available: 1005MB
> Cached: 984MB
>
> HW reserve: 50MB
> In use: 3040MB
> modified: 2MB
> standby: 984MB
> free: 22MB
>
> vmware-vmx.exe: working set: 1017832 KB
>
>
> ____VM Resource Allocation details___
>
> VM resource allocation:
> CPU cores: 2
> RAM: 1GB
>
>
>
> ____VM running____
>
> (ouput of top command)
>
> top - 16:15:19 up 25 days, 1:52, 12 users, load average: 0.64, 0.32, 0.16
> Tasks: 164 total, 1 running, 163 sleeping, 0 stopped, 0 zombie
> Cpu(s): 0.2%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
> Mem: 1012336k total, 805416k used, 206920k free, 41560k buffers
> Swap: 1046524k total, 253560k used, 792964k free, 307304k cached
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 2324 rp1396 20 0 1155m 25m 7524 S 0 2.6 44:28.06 compiz
> 2783 rp1396 20 0 571m 60m 6676 S 0 6.2 8:20.78 gnome-terminal
> 38409 root 20 0 0 0 0 S 0 0.0 0:00.59 kworker/0:2
> 1 root 20 0 24436 1960 1036 S 0 0.2 0:07.32 init
> 2 root 20 0 0 0 0 S 0 0.0 0:00.31 kthreadd
> 3 root 20 0 0 0 0 S 0 0.0 0:08.15 ksoftirqd/0
> 6 root RT 0 0 0 0 S 0 0.0 0:12.33 migration/0
> 7 root RT 0 0 0 0 S 0 0.0 0:22.61 watchdog/0
> 8 root RT 0 0 0 0 S 0 0.0 0:13.41 migration/1
> 10 root 20 0 0 0 0 S 0 0.0 0:11.42 ksoftirqd/1
> 12 root RT 0 0 0 0 S 0 0.0 0:25.58 watchdog/1
> 13 root 0 -20 0 0 0 S 0 0.0 0:00.00 cpuset
> 14 root 0 -20 0 0 0 S 0 0.0 0:00.00 khelper
>
>
>
> ____VM NOT running____
>
> win7 performance monitor stats:
>
> used physical memory: 49%
>
> Installed: 4096MB
> Total: 4046MB
> Available: 2042MB
> Cached: 1182MB
>
> HW reserve: 50MB
> In use: 2003MB
> modified: 2MB
> standby: 1213MB
> free: 818MB
>
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com <mailto:ubuntu-users at lists.ubuntu.com>
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
>
>





More information about the ubuntu-users mailing list