LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-30-2012, 08:10 AM   #1
Iyyappan
Member
 
Registered: Dec 2008
Location: Chennai, India
Distribution: CentOS 5, SLES 11
Posts: 245

Rep: Reputation: 4
SSH conntectivity


I created a machine(OpenSUSE 11.30) in Cloud. I have used that machine for nearly 6 hours, but suddenly i m not able to connect the machine. It displays an error "server unexpectedly closed network connection". I have used the same key for connecting the machine and also i have rebooted the machine several times before. All went well, but suddenly the Server Closed error is occuring. I dont know how this could happen. But i am to access the same machine in one laptop alone. I have not touched hosts.allow n hosts.deny files. Its default only . Kindly help

Last edited by Iyyappan; 01-30-2012 at 08:11 AM.
 
Old 01-30-2012, 08:13 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
I have used that machine for nearly 6 hours, but suddenly i m not able to connect the machine
do you mean that you left the connection idle and suddenly the message popped up?

Code:
server unexpectedly closed network connection
Quote:
All went well, but suddenly the Server Closed error is occuring. I dont know how this could happen.
But i am to access the same machine in one laptop alone
so now you are not able to connect using ssh through your desktop and successfully connected through laptop?
 
Old 01-31-2012, 03:18 AM   #3
Iyyappan
Member
 
Registered: Dec 2008
Location: Chennai, India
Distribution: CentOS 5, SLES 11
Posts: 245

Original Poster
Rep: Reputation: 4
I continuously worked on that machine for 6 hrs( no break ). Strange thing is, i am able to connect the machine via vncviewer, but i am not able to connect the machine using putty and winscp. For winscp too, i was able to connect initially, as i working i lost the connection. The machine which i worked was in Amazon Cloud. The private key which i used is common for another 2 machines. I am able to work on those machines with the same key. I do not know how this can happen. More info, port 22 is open, i check through telnet.I went scratching my head but no break through. Even the ssh connection did not last in the laptop, after few hours even that got disconnected. I just escaped just because VNC worked properly. I still cant figure out what went wrong..Currently machine is in use with developers, so i am not able to investigate further..
 
Old 01-31-2012, 06:38 AM   #4
abohmeed
LQ Newbie
 
Registered: Mar 2011
Posts: 21

Rep: Reputation: 3
A less probable cause, but worth checking: check the status of the sshd dameon
 
Old 01-31-2012, 06:48 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by Iyyappan View Post
I continuously worked on that machine for 6 hrs( no break ). Strange thing is, i am able to connect the machine via vncviewer, but i am not able to connect the machine using putty and winscp. For winscp too, i was able to connect initially, as i working i lost the connection. The machine which i worked was in Amazon Cloud. The private key which i used is common for another 2 machines. I am able to work on those machines with the same key. I do not know how this can happen.
So you are not at all able to connect or you get notified for password but your key is not working?

restart your ssh daemon on the server

and you didn't answered my question.Had you left the putty session idle for few minutes when it got disconnected?If yes then this is what you need to do on server machine

Code:
#vi /etc/ssh/sshd_config
ClientAliveInterval 60
ClientAliveCountMax 5

#service sshd restart
 
Old 02-01-2012, 11:19 PM   #6
Iyyappan
Member
 
Registered: Dec 2008
Location: Chennai, India
Distribution: CentOS 5, SLES 11
Posts: 245

Original Poster
Rep: Reputation: 4
[solved]

I did not leave the putty idle. After restarting ssh via VNC its working now. Restarting alone solved it. I never tried restarting, i myself do know how i forgot to restart. Thanks a lot for info.

Last edited by Iyyappan; 02-02-2012 at 05:01 AM.
 
Old 02-02-2012, 03:57 AM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Can you please mark the thread as "solved" so that it can help others as well
 
1 members found this post helpful.
  


Reply



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
The difference in settings: console from desktop & ssh as DISPLAY not set when ssh in wikapuki Linux - Newbie 10 07-02-2010 09:44 AM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:35 PM.

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