LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   ssh problem "server unexpectedly closed network connection" (https://www.linuxquestions.org/questions/suse-opensuse-60/ssh-problem-server-unexpectedly-closed-network-connection-782354/)

sunilvadranapu 01-15-2010 05:41 AM

ssh problem "server unexpectedly closed network connection"
 
Hi,
I'm remotely connecting to SUSE 10 system using OpenSSH_4.2p1 from PUTTY. My problem is that my session to the server was getting disconnected after some time. when i'm giving "exit" command, it is giving the message "server unexpectedly closed network connection". Also it is showing my last login wrongly. what went wrong from sshd side i dont know.could any one help me regarding this.

thanks in advance.
-SUN

unSpawn 01-16-2010 04:40 AM

Quote:

Originally Posted by sunilvadranapu (Post 3827381)
My problem is that my session to the server was getting disconnected after some time.

Disconnection can happen for different reasons ranging from flaky network connections and shell session timeouts to load problems and admins forcing you out...


Quote:

Originally Posted by sunilvadranapu (Post 3827381)
when i'm giving "exit" command, it is giving the message "server unexpectedly closed network connection".

If ending your session from a GNU/Linux workstation works OK then maybe that's just a PuTTY-specific informational message?


Quote:

Originally Posted by sunilvadranapu (Post 3827381)
Also it is showing my last login wrongly.

You didn't show is what's "wrong" and what would be "right"?

sunilvadranapu 01-18-2010 01:05 AM

I want to add one more points on my problem:

when i directly did ssh from my windows system to remote linux system "testhy" through PUTTY, my session was got disconnected after 1 hour(i connected at 10:15am and session got disconnected at 11:15am).

But when i first PUTTY to some other Linux system and did ssh from there to "testhy", session was not disconnected. does the problme with PUTTY on my windows system? but others also getting same problem.

i could not figure out whether the problem is with SSH server or SSH client? is there any specific SSH configuration for PUTTY.

Thanks in advance

unSpawn 01-19-2010 01:14 PM

There's several timeout settings like the one in the login shell (e.g. "tmout" in 'man bash') and SSH (search 'man ssh_config' for "timeout") you could check for?

sunilvadranapu 01-20-2010 08:59 AM

shell time out is set to 0.
Code:

sun@testhy:/home/sun> echo $TMOUT
0

i have tried it by setting "keepAlive" for 5-min in putty and stopped firewall on server system(sshd), but still both idle and using sessions are becoming inactive after 1-hour. please suggest me if anything else need to be checked.

unSpawn 01-20-2010 11:24 AM

I can only suggest to run your sshd with triple "-d" and "-v" and do the same with a GNU/Linux client, resulting in lots of logging which together with syslog information around the time of forced logout and maybe searching for running applications or scripts that force logout could show some lead. With the amount of information provided it'll just be searching for clues. At least from my point of view.

sunilvadranapu 01-21-2010 08:40 AM

My PuTTY Log says - "Event Log: Initiating key re-exchange (timeout)", so I think problem is with key re-exchange. when key exchange is initiated by ssh client(PuTTY) testhy(server) is not responding in time and hence connection becomes inactive.

how can i resolve this issue, please help me.

ezfox 02-10-2010 02:43 AM

Set the following option in Putty to "on"
Connection / SSH / Bugs / Handles SSH-2 key re-exchange badly

OR

change the following options to "0"
Connection / SSH / Kex / Max Minutes before rekey


All times are GMT -5. The time now is 11:45 PM.