ssh error

Hi ,

When I try to ssh a server iam getting the error message

-----Server responded. connection closed

The connection to the remote host was lost. This usually means the network connection has terminated or remote host computer has rebooted .Most network outages are short so trying again may help.--------------------------

This is a recurrent issue and connection gets stuck after a certain amount of time.

How to solve this issue ,what is the root cause for this issue?

Who is Participating?
What are you connecting to? Is there a time out configured?
Kamaraj SubramanianApplication Support AnalystCommented:
just ping the server and verify the response time,

If the response time is not good, then you have to check the switch and network components
phoenix26Author Commented:
Hi vito,

           Iam trying to connect to a server .Where to check this time out.I believe in router?am i right ?

To itkamaraj,

ping not allowed.

Please let me know any other work around
There should be timeout values in the SSH config file on the server. The location depends on the OS you're using.

Just to clarify, when does this error happen? Is it when you initially try to logon, or is it after a certain period of idle time after you've already successfully logged in?
Kerem ERSOYPresidentCommented:

Try to launch ssh with v switch such as this:

ssh -vvv  user@destination

and post the output here.  You might also want to post excerpts from your /var/log/messages concerning the SSH session at both ends.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.