LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-02-2006, 04:49 PM   #1
positrox
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSe, Debian
Posts: 26

Rep: Reputation: 15
Ssh freezes in unpredictable time


Hello,

I think this is a very basic problem but not for me. When I do ssh from my laptop (through wlan and wan) to my other computer, the session freezes in some time idling.

I have set to my other computerŽ s sshd_config TCPKeepAlive yes and KeepAlive yes, I have also tried them with no. What is this about?

Also the kernel tcp_keepalive_time seems to be ok:

sudo cat /proc/sys/net/ipv4/tcp_keepalive_time
7200.

I appreciate any suggestions, this is really annoying me!

edit:

hereŽ s a bit more info, when the connection freezes I can still see that it established from netstat in the other computer. Is it possible somehow to try to attach back to this connection? Anyway that wouldnt solve the actual problem but it would be nice to know too.

Last edited by positrox; 03-02-2006 at 04:51 PM.
 
Old 03-03-2006, 10:09 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Check your ifconfig (and iwconfig, if wireless), as well as 'netstat -t -s' statistics to see if you are getting a high error rate when the problem occurs.
 
Old 03-03-2006, 11:53 AM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,004

Rep: Reputation: 304Reputation: 304Reputation: 304Reputation: 304
I am seeing the exact same thing. I haven't taken much time to debug it yet, as I'm usually in and out with ssh, rarely idle, so it doesn't pop up for me terribly often given my usage pattern.

---

Maybe we can compare notes. My setup:

client end: Debian Sarge, ssh version 1:3.8.1p1-8.sarge.4
server end: Debian Sid, openssh version 1:4.2p1-5 (provides ssh-server)

After only a few minutes of idle time it will lock up on me. ipconfig doesn't show any errors (checked per suggestion from macemoneta). Both client and server ends still show an ESTABLISHED connection after the lockup. New ssh connections can be created while the old one is locked up. Killing the window on the client end is the only recovery I've found for the hung client. This does not kill the process on the server end. A manual kill -9 on the connection's sshd process is required to clear the server.

I do NOT see any lockups when this same client connects to a totally different server, in my case a server running Solaris 7 (yeah, I know it's old ... not my machine though) This connection can sit idle for hours without lockup.

One thing that caught my eye when viewing netstat output on the client and server after the connection was locked: The client end was showing the ESTABLISHED connection using tcp while the server end was showing tcp6. I have no idea if this is at all relavent, but it caught my eye and I will try to look into it further to rule this out as a factor.
 
Old 03-03-2006, 03:12 PM   #4
positrox
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSe, Debian
Posts: 26

Original Poster
Rep: Reputation: 15
Hi

My setup is the following
Client end: Suse 10.0 openssh-4.1p1-10.4
Server end: Debian 3.1 ssh 3.8.1p1-8.sarg (OpenSSH)

Today I tried to scp from the suse machine to the debian machine and it gave me this:

Protocol major versions differ: 2 vs. 1
lost connection

So that could cause the freezing too. I think I have to compile the newest ssh for my Debian box and see if that helps. Though, I dont have much time so it could take some time to complish that.

Haertig, if you are less busy than me, please let us know if the installation of the new version helps .

Cheers
 
Old 03-03-2006, 11:09 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,004

Rep: Reputation: 304Reputation: 304Reputation: 304Reputation: 304
Further info:

Using Putty v0.58 ssh client from a Win2000 box to connect to that same Debian SID server above ... no lockups.

Using Putty v0.56 from WinXP ... no lockups either.
 
Old 03-06-2006, 10:03 AM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,004

Rep: Reputation: 304Reputation: 304Reputation: 304Reputation: 304
On server end, changed sshd ListenAddress from :::: to 0.0.0.0 No difference. Still locked up (when connecting from client on Debian Sarge).
 
Old 03-11-2006, 03:06 PM   #7
positrox
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSe, Debian
Posts: 26

Original Poster
Rep: Reputation: 15
Have you tried with different routers and from different clients? My friend tried with ssh and putty but didnt notice freezing. I heard that in some netgear and linksys routers there is a problem which causes session freezing.

I dont right now have an opportunity to try via different routers but I will keep in touch. I want to solve this very annoying problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unpredictable wireless behaviour Suse 10.9 ndiswrapper 1.2 davidhilbert Linux - Wireless Networking 1 10-17-2005 03:22 PM
persistent (but unpredictable!) cups problem darksmiley Linux - Hardware 7 06-17-2005 08:05 PM
ssh freezes suhis Linux - Networking 7 04-29-2005 08:56 AM
FC3 Freezes up after time.... astronerd Fedora 8 03-14-2005 03:28 PM
X server freezes from time to time grayswander Linux - General 3 01-02-2005 10:43 AM


All times are GMT -5. The time now is 04:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration