can't login network server through ssh after putting main computer to sleep
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.
can't login network server through ssh after putting main computer to sleep
I'm having an odd problem. Once I reboot my server, I can login through ssh. However, once I put my main computer to sleep (Macbook) and then wake it up, I can't connect through ssh. I get the error:
Code:
host is down
I get the same error when I ping the machine.
Yet, if I ssh to a totally different server, then ssh from outside my network into my file server, it works. I don't understand this. The machine is definitely up and accepting connections, but not from my computer.
When I put my macbook to sleep, I usually have the ssh to my file server open in screen, but shouldn't it just close the connection and then allow me to reconnect?
I'm not familiar with Mac but it seems to me that when you put it to sleep with the SSH session still open, it kind of remembers the status when you wake it up again. Shutdown the SSH connection prior to putting your Mac to sleep, wake it up again when it's rested and see if you can connect.
I.M.H.O. looks like a sort of cookie or session_id that doesn't update correctly.
Hi Eric, thanks for your reply. I really hope to get this figured out.
I tested your suggestion. I detached from screen, exited out of ssh, and put my computer to sleep. When I came back in less than an hour, I was again receiving the host is down error. I tried rebooting the mac this time to no avail. It would not connect to the file server even after rebooted. Nonetheless, I could still connect through the third server to my file server.
Oh goodness. Do you think it could be a problem with an ssh configuration file? I've tried restarting sshd but that did not work. The only solution seems to be a reboot to the file system, but the error persists too often for that to be a resolution.
I'm still thinking it has to do with the sessions not getting terminated. Normally if you shut down a session should get terminated and the tunnels closed. Maybe the problem is on the SSH server. Check your sshd_config file to see if you encounter variables not set or not correctly set.
I use ssh a lot at work and never have encountered this behavior connecting from my XP workstation (company policy, not my choice). I just tried it, just putting my laptop to sleep and waking it up again and the only thing I got was my ssh client that stated that the connection was terminated. Hitting the connect button got me connected right away.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.