LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-15-2010, 05:41 AM   #1
sunilvadranapu
Member
 
Registered: May 2006
Posts: 64

Rep: Reputation: 15
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
 
Old 01-16-2010, 04:40 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by sunilvadranapu View Post
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 View Post
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 View Post
Also it is showing my last login wrongly.
You didn't show is what's "wrong" and what would be "right"?
 
Old 01-18-2010, 01:05 AM   #3
sunilvadranapu
Member
 
Registered: May 2006
Posts: 64

Original Poster
Rep: Reputation: 15
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
 
Old 01-19-2010, 01:14 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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?
 
Old 01-20-2010, 08:59 AM   #5
sunilvadranapu
Member
 
Registered: May 2006
Posts: 64

Original Poster
Rep: Reputation: 15
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.
 
Old 01-20-2010, 11:24 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 01-21-2010, 08:40 AM   #7
sunilvadranapu
Member
 
Registered: May 2006
Posts: 64

Original Poster
Rep: Reputation: 15
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.
 
Old 02-10-2010, 02:43 AM   #8
ezfox
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
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

Last edited by ezfox; 02-10-2010 at 02:59 AM.
 
  


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
Putty:server unexpectedly closed network connection dyool Ubuntu 8 03-07-2012 08:35 PM
SSH issue ""Server unexpectedly closed network connection" Errsta_Fonzarelli Linux - Software 12 05-24-2010 02:35 PM
Putty: server unexpectedly closed network connection Dshah Linux - Server 2 12-20-2009 09:57 AM
Different SSH "Server unexpectedly closed network connection" (using Putty) mjwraw Linux - Networking 4 07-22-2009 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration