LinuxQuestions.org
Review your favorite Linux distribution.
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 08-24-2016, 10:35 AM   #1
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Rep: Reputation: 15
SSH connection problem


I'm running archlinux on my laptop and debian on a netbook in my bedroom which is connected to an external hard drive which I use for backups. Every morning when I try to ssh the netbook, I have connection problems. After fooling around with it for a while, it goes through and then I have no problems until I shut the laptop off and start up again. The most consistent way of getting through is to ping the netbook until the ping goes through, which might take a couple dozen pings. It's not a big deal but I'm wondering if this is a normal problem and what I might try to fix it.
 
Old 08-24-2016, 01:30 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Sounds like your netbook is going to sleep and needs to be waken up before you can ssh into it. I'd start there and check the settings of it.
 
Old 08-24-2016, 09:47 PM   #3
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by lazydog View Post
Sounds like your netbook is going to sleep and needs to be waken up before you can ssh into it. I'd start there and check the settings of it.
Even if I go and wake it up first, I get the same results. It doesn't go to sleep, it just shuts off the display. But I'll wake the display up and still the same results.
 
Old 08-25-2016, 07:19 AM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
In the mornings can you ping it without issues? Are all your devices on the same subnet? Are you sure nothing is going to sleep? Try pinging it during the evening to see if it responds.
 
Old 08-25-2016, 09:55 AM   #5
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Original Poster
Rep: Reputation: 15
I'm sure nothing is sleeping. The difference seems to be turning my laptop. When I turn it off an back on later, I can't ssh without pinging it a few dozen times. Here's what I get when I ssh:

$ ssh ewl@192.168.2.8
ssh: connect to host 192.168.2.8 port 22: No route to host

And here's the result from pinging:

$ ping 192.168.2.8
PING 192.168.2.8 (192.168.2.8) 56(84) bytes of data.
From 192.168.2.5 icmp_seq=1 Destination Host Unreachable
From 192.168.2.5 icmp_seq=2 Destination Host Unreachable
From 192.168.2.5 icmp_seq=3 Destination Host Unreachable
From 192.168.2.5 icmp_seq=4 Destination Host Unreachable
From 192.168.2.5 icmp_seq=5 Destination Host Unreachable
From 192.168.2.5 icmp_seq=6 Destination Host Unreachable
From 192.168.2.5 icmp_seq=7 Destination Host Unreachable
64 bytes from 192.168.2.8: icmp_seq=8 ttl=64 time=2070 ms
64 bytes from 192.168.2.8: icmp_seq=9 ttl=64 time=1061 ms
64 bytes from 192.168.2.8: icmp_seq=10 ttl=64 time=62.0 ms
64 bytes from 192.168.2.8: icmp_seq=11 ttl=64 time=1.78 ms
64 bytes from 192.168.2.8: icmp_seq=12 ttl=64 time=2.62 ms

This instance corrected rather quickly. Sometimes it fails more often before it goes through.
 
Old 08-25-2016, 10:57 AM   #6
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
I'm going to say this is your Laptop that is causing your issues.

How do you have your laptop network configured?
Using wireless what AP do you have?
Can you ping the gateway as soon as the laptop is powered on?
what does ifconfig give you when you turn on the laptop?

Could be that the loss is your router trying to find the netbook as the MAC table doesn't hold information for ever. and it has to re-acquire the MAC address of the netbook.
 
Old 08-25-2016, 01:26 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
It's fairly normal for networking equipment to be turned off when a computer is asleep, and for it to take a few seconds to reconnect, e.g. if it's wireless.
 
  


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
[SOLVED] Ssh connection problem cajunchief Linux - Software 15 01-06-2016 10:16 AM
ssh connection problem sekhar.hai Linux - Newbie 7 07-16-2014 11:43 PM
ssh connection problem. windstory Linux - Newbie 2 01-02-2009 06:25 PM
A problem with ssh connection lawrence_lee_lee Linux - Software 5 05-16-2008 08:14 AM
Ssh connection Problem ??? ce_emre Linux - Networking 2 10-11-2006 07:22 AM

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

All times are GMT -5. The time now is 06:08 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