View previous topic :: View next topic |
Author |
Message |
vert Apprentice


Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Tue Oct 21, 2003 6:37 pm Post subject: Weird SSH connection problem --> Freezes for 15 minutes?? |
|
|
I've got this weird problem I can't figure out. After an certain period of time (not constant as far as I know), the SSH connection to my Gentoo box will die. Putty gives an "Software caused connection to abort" error.
I tried logging in via another linux box simultaneously, but that connection "freezes" at the same time as my direct putty connection. While the connection to the other box remains active.
Other network connections remain intact, such as my HTTPS connection for reading mail. Also, the server is still pingable.
When this freeze happens I'm not able to open up a new session for quite some time. My guess is for about 13-15 minutes. After that I can login again AND the connection I had still opened via the other linux box came back to life!
When I can log back in, typing in "who" reveales that I'm still logged into the system with the old connections. Netstat also shows this with "ESTABLISHED" ssh connections from my ip.
I looked in the logs, but cannot find anything that could explain this. I'm really lost...
I'm gonna do some timing experiments, see if there is any consistency in that. Meanwhile, all suggestions are very much welcome! |
|
Back to top |
|
 |
fimblo Guru

Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Tue Oct 21, 2003 7:11 pm Post subject: |
|
|
just wondering- what version of sshd are you running? to see the de facto version you're actually running you can telnet to port 22 on the server. On mine, I have: Code: | fimblo@waoh:~> telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_3.7.1p2
|
I suspect its a client problem, not a server one, but we'll need to test a bit first.
1) try testing some other clients. on unix i only know of two clients- openssh and putty. on win, you can use openssh, putty, and sshclient.exe. Does this problem still arise?
2) sit by your destination server and ssh to localhost. does this problem arise?
when testing from another host, did you first ssh to it then ssh from it to the destination? in that case it could be your local putty which is messed up.
The fact that the tcp connection is still established and that it fires up again is a built in function of TCP. After a while TCP assumes that the connection is dead and terminates it.
hope this helps _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
 |
vert Apprentice


Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Tue Oct 21, 2003 7:38 pm Post subject: |
|
|
I'm running the same version as you are: SSH-2.0-OpenSSH_3.7.1p2
And I don't think it is a client problem, since the connection from to the other linux box stayed up and the fact that the freeze occurs with both putty and the sshclient under linux. Only putty aborts thus ending the connection. The sshclient keeps the connection open and resumes after a period of time.
I will try the localhost test with screen, that way I won't have to sit next to my server (which is actually quit far away at the moment). Also, what might make a difference is that we moved to a dsl modem/router. I configured the thing to pass everything through to the server, but it might have something to do with it.
Also, I timed it once and my connection freezed after exactly 30 minutes. Might be coincidence, but it seems an awfully nice round figure.... |
|
Back to top |
|
 |
vert Apprentice


Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Tue Oct 21, 2003 7:40 pm Post subject: |
|
|
Something went wrong with posting, so my previous (long) post was here twice. I removed it.
Last edited by vert on Wed Oct 22, 2003 8:04 am; edited 1 time in total |
|
Back to top |
|
 |
fimblo Guru

Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Tue Oct 21, 2003 8:00 pm Post subject: |
|
|
just realized what it could be. A year back or so I made my own little linux router to share my internet connection. I didnt make it correctly, so if I started a ssh connection from my local lan to a server outside my router, and didnt type anything for some time (like hmm 15 minutes?) the router assumed that the ssh session was over and killed the network address translation.
could this be happening on your system? _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
 |
vert Apprentice


Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Wed Oct 22, 2003 7:28 am Post subject: |
|
|
Don't think so. Since it also happens when I type regularly.
It might still be that the router quits the nat connection, but not because of inactivity |
|
Back to top |
|
 |
fimblo Guru

Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Wed Oct 22, 2003 8:25 am Post subject: |
|
|
oh well
did you try a local ssh session? if that gets killed as well, then its definitely the server. it might be good to test both 127.0.0.1 and your NIC ip address.
good luck _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
 |
vert Apprentice


Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Thu Oct 30, 2003 6:47 pm Post subject: |
|
|
Well, I tried local sessions and they do not freeze. Not locally and not from within the internal network. This makes me feel the bad guy is the alcatel modem/router. Either that or the firewall.
I will have to think of some other tests and when I'm home again sometime I will also look at the configurations. |
|
Back to top |
|
 |
jesterspet Apprentice


Joined: 05 Feb 2003 Posts: 215 Location: Atlanta
|
Posted: Fri Oct 31, 2003 1:56 am Post subject: |
|
|
If both connections to the server freeze at the same time, it sounds like your sshd is trying to create a new key and is unable to perform any other actions until after this is complete.
check your /etc/ssh/sshd-config keysize and regeneration rate.
Failing that, try running ssh with the -vv flags and look at the output, see if anything presents itself. _________________ (X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95 |
|
Back to top |
|
 |
vert Apprentice


Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Wed Dec 03, 2003 6:30 pm Post subject: |
|
|
I don't think its that, since I can stay logged without problems from the internal lan.
I'm still searching for an answer.
It could also be my provider of course... (Speedlinq, for who's interested. They use the networks of BBned and BabyXL). |
|
Back to top |
|
 |
|