LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2009, 12:51 AM   #1
truthe
Member
 
Registered: Sep 2004
Distribution: arch linux .7
Posts: 30

Rep: Reputation: 15
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?

Thanks for any help you can provide.
 
Old 07-25-2009, 01:33 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 07-25-2009, 03:00 AM   #3
truthe
Member
 
Registered: Sep 2004
Distribution: arch linux .7
Posts: 30

Original Poster
Rep: Reputation: 15
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.
 
Old 07-25-2009, 03:20 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 07-25-2009, 03:38 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Also check your log files for errors, both on the server and on your Mac.

Kind regards,

Eric
 
Old 07-26-2009, 01:41 AM   #6
truthe
Member
 
Registered: Sep 2004
Distribution: arch linux .7
Posts: 30

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting harddisk to sleep... and keeping it sleepy crispy_chunks Linux - Hardware 5 01-09-2009 02:33 AM
Private server with main computer as gateway? Banyon Linux - Networking 5 05-12-2006 11:30 PM
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 01:14 AM
Putting monitor to sleep cothrige Linux - Newbie 3 03-10-2004 10:07 AM
Putting my computer to sleep computergirl Linux - Hardware 26 09-28-2003 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration