Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using RHEL 5.2 and this is quite surprising situation when I use putty to connect to my remote machine it regularly gets disconnected when kept inactive for few minutes then I need to relogin to start my work.
But again this happens with only one server and all the other servers in which I login, there is no such problem.
I know about these things but I want to know why this happens with only one server and not others
as I checked sshd_config of other machines as well and I don't see any changes but the only difference is they seem to work properly and never gets disconnected?
then start a new session and let it drop out. and check if the log has anything useful to say.
I havent used putty in years so i dont know much about it now, but as your link suggests, it may be doing something to disconnect after inactivity.. What happens if you ssh from a different linux host to the problematic one? (to isolate if it is a putty/client, or server problem.
then start a new session and let it drop out. and check if the log has anything useful to say.
I havent used putty in years so i dont know much about it now, but as your link suggests, it may be doing something to disconnect after inactivity.. What happens if you ssh from a different linux host to the problematic one? (to isolate if it is a putty/client, or server problem.
this is the output of command you mentioned
Code:
Dec 19 21:35:28 server sshd[2741]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.10.10.30 user=root
Dec 19 21:35:30 server sshd[2741]: Failed password for root from 10.10.10.30 port 52162 ssh2
Dec 19 21:35:32 server sshd[2741]: Accepted password for root from 10.10.10.30 port 52162 ssh2
Dec 19 21:35:32 server sshd[2741]: pam_unix(sshd:session): session opened for user root by (uid=0)
Dec 19 21:51:05 server sshd[2741]: pam_unix(sshd:session): session closed for user root
Dec 19 21:52:10 server sshd[2799]: Accepted password for root from 10.10.10.30 port 52312 ssh2
Dec 19 21:52:10 server sshd[2799]: pam_unix(sshd:session): session opened for user root by (uid=0)
Dec 19 22:07:15 server sshd[2799]: pam_unix(sshd:session): session closed for user root
Dec 20 02:44:55 server sshd[3320]: Accepted password for root from 10.10.10.30 port 59671 ssh2
Dec 20 02:44:55 server sshd[3320]: pam_unix(sshd:session): session opened for user root by (uid=0)
and even I tried from ssh
the session gets disconnected in a while with this error message
Code:
Read from remote host 192.168.0.195: Connection reset by peer
Connection to 192.168.0.195 closed.
Nothing stands out to me there...
But a couple more ideas worth trying..
To get more info out of the error. try adding -vvv to the ssh command. and stopping the sshd process on the server, and running it from the commandline with debugging increased.
Code:
sshd -ddd &
adding -e will make ssd show errors on screen rather than log them, if your sitting at the screen.
Is the shell inactivity timeout set to something silly? IIRC 0, means the shell wont time out. On the ssh SERVER, run the below, it can be set permenantly in .bashrc.
Code:
echo $TMOUT
Could it be ACPI powering down a disk, or something, the delay of it powering back up causing the dropout?
Is there a firewall inbetween the client and server, that could be dropping inactive connections?
does it means that ssh itself is sending packets after every 1 min to keep the session alive as I have mentioned in sshd_config?
But still even if the problem is solved I don't get any answer to my question that why it happens only on one server where all other session works fine without any changes?
I also tried adding this line
Code:
ServerAliveInterval 60
but while restarting it returns with a error
Code:
Bad configuration option: ServerAliveInterval
Is it some where related to version of ssh or distribution support?
does it means that ssh itself is sending packets after every 1 min to keep the session alive as I have mentioned in sshd_config?
Yes, you wont see the debug messages when ssh'ing normally (ie: without -vvv)
Quote:
But still even if the problem is solved I don't get any answer to my question that why it happens only on one server where all other session works fine without any changes?
That, I'm not sure about, what is the server doing? is it under heavy system load, or traffic load perhaps?
Quote:
Is it some where related to version of ssh or distribution support?
ServerAliveInterval, is effectively the same as ClientAliveInterval, except in the other direction, it is set in the clients ssh_config.
That, I'm not sure about, what is the server doing? is it under heavy system load, or traffic load perhaps?
No, that is my mail server and is touched only when required to make any changes in the config file.
Do you have any possible ideas which might be the reason for such issue?
I have installed sendmail+apache+squirrelmail on this server and nothing else
But it seems while restarting ssh is unable to recognise the syntax used for ServerAliveInterval
Do you have any possible ideas which might be the reason for such issue?
Not really, i guess there could be any number of reasons, but I cant see any obvious ones in this situation.
Quote:
But it seems while restarting ssh is unable to recognise the syntax used for ServerAliveInterval
does it has anything to be done with distro used?
As i said in my last post, ServerAliveInterval, is set in ssh_config, on the client machine.
ClientAliveInterval, is set in sshd_config, on the server.
I believe that to be the same for all distro's.
As i said in my last post, ServerAliveInterval, is set in ssh_config, on the client machine.
ClientAliveInterval, is set in sshd_config, on the server.
I believe that to be the same for all distro's.
oops, sorry my mistake
Yes its working when placed in ssh_config
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.