Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
We have encountered a very strange issue with OpenSSH on CentOS 5.2 (openssh-server-4.3p2-26.el5_2.1). On one of our hosts, the ssh sessions are being closed automatically for no apparent reason with the following message:
Quote:
Read from remote host server.com: Connection reset by peer
Connection to server.com closed.
If we try and reconnect we get
Quote:
ssh: connect to host server.com port 22: Connection refused
If we check the port, it shows its closed
Quote:
PORT STATE SERVICE
22/tcp closed ssh
We have checked the following:
iptables is stopped
hosts.allow - no entries
hosts.deny - no entries
erased openssh
re-installed openssh (used default sshd_config)
The port appears to close for like 5 mins, then re-opens again.
All the previous sessions then remains open on the system.
Quote:
03:40:24 up 1:19, 4 users, load average: 0.17, 0.05, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 server2.com 02:41 56:02 0.01s 0.01s -bash
root pts/1 server2.com 02:25 53:13 0.00s 0.00s -bash
root pts/2 server2.com 03:07 11:56 0.01s 0.01s -bash
root pts/3 server2.com 03:40 0.00s 0.01s 0.00s w
We have run out of ideas and might rebuild the box soon.
I've seen some (not all) of this behavior when I am sitting behind a NAT device, accessing a remote host. After a certain idle period, I get disconnected - but the ssh session is still active on the host.
Try setting ServerAliveInterval 90 in ~/.ssh/config on the client side for the user you're running as. For more details, see the manpages for ssh_config(5).
I kind of had this problem. Mine was due to when setting up the httpd I got interupted and placed an extra 255 in the subnet. I would connect but then it would disconnect for no reason after 5 or 10 minutes. Some times right in the middle of an edit. Does this happen on all your clients or only one?
I have exactly the same problem. When I saw this final resolution, I don't think that could be our problem. Well, as it turned out that I have exactly the same problem with IP conflict. A Windows admin put a new server in. The only way he check is use ping. Since this is a public facing server, I made it not ping-able. He just grab it without even checking the DNS, or the asset record. Where is the process?
There you have it. Simple solution for a puzzling problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.