Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
04-19-2011, 12:23 PM
|
#1
|
Member
Registered: Mar 2005
Posts: 157
Rep:
|
Frequent broken pipes from SSH connection after power loss
I have three machines networked to my desktop which run a bunch of simulations in parallel. As they're running, I connect to them via SSH and screen to keep an eye on the runs and look at the output. They stay usually connected for days at a time. The SSH servers and client are running Fedora 14.
Yesterday one of my coworkers accidentally yanked the plug on one of the servers while it was running. When I powered it up again, I started getting some odd connection problems. I couldn't connect to it via SSH initially because I got the Remote Host Identification Changed (RSA host key changed) error. I deleted the key in .ssh/known_hosts, which allowed me to connect, but it denied my password. I then logged into that machine locally, restarted sshd, and removed .ssh/known_hosts again. Now I can log in via SSH without problems. However, the connection dies with a "Write failed: Broken pipe" error every few minutes (as opposed to the other two machines, which stay connected indefinitely).
So my questions are:
1.) why would a power loss affect the behavior of the SSH server?
2.) why do I keep getting broken pipes now?
Thanks!
|
|
|
04-19-2011, 01:31 PM
|
#2
|
Member
Registered: Aug 2009
Location: Chicago
Distribution: CentOS
Posts: 114
Rep:
|
A reboot causes services to be restarted, so config files are re-parsed. If there was an update to the ssh-server or changes made to the config file, they would not be made live until the server restarted. To fix the broken pipes issue, open your ssh configuration file (usually /etc/ssh/sshd_config) and check for ClientAliveInterval and ClientAliveCountMax. I suspect these items because it sounds like the client machine is not responding to keepalive requests. You can check the man page for sshd_config for more details on those and other directives that may be pertinent. You could also try simply copying over the sshd_config from one of the other servers.
|
|
|
04-19-2011, 01:35 PM
|
#3
|
Member
Registered: Mar 2010
Posts: 58
Rep:
|
Off the top of my head, try "ifconfig" and see if you're getting any packet errors or drops on your interface. The power drop might have munged it.
|
|
|
04-19-2011, 02:50 PM
|
#4
|
Member
Registered: Mar 2005
Posts: 157
Original Poster
Rep:
|
ifconfig shows no errors and no drops.
This apparently isn't just an SSH problem. Earlier today I connected through VNC, about an hour ago VNC failed to connect, and now it's working again.
I checked the SSH config files, and they are the same as the other machines, so nothing changed. Also, that doesn't seem to explain why it denies my password.
This is starting to get me concerned. Thanks for your input, let me know if you have other ideas.
|
|
|
04-19-2011, 05:08 PM
|
#5
|
Member
Registered: Mar 2005
Posts: 157
Original Poster
Rep:
|
I borrowed another ethernet card and popped it in there. That one works fine... all the connection problems are gone. I didn't think it was a hardware problem because I figured the RSA key wouldn't change if something was broken, it just wouldn't connect at all.
I guess I was wrong.
This is why I can't have nice things.
|
|
|
All times are GMT -5. The time now is 06:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|