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 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? Thanks for any help you can provide. |
Hello,
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. Kind regards, Eric |
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. Thanks. |
Hi,
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. Kind regards, Eric |
Also check your log files for errors, both on the server and on your Mac.
Kind regards, Eric |
checked log files; nothing.
I'm nearly certain it's something with the router, but I won't be able to diagnose it. Thanks Eric. |
All times are GMT -5. The time now is 04:09 PM. |