LinuxQuestions.org
Register a domain and help support LQ
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 11-23-2012, 03:37 PM   #1
crs17
LQ Newbie
 
Registered: Mar 2004
Posts: 21

Rep: Reputation: 0
ssh works only intermittantly on home network


I have a small home network: two linux boxes connected together by a wireless hub. And a WIMAX modem ethernetted cabled from the hub.

When I try to ssh from one linux box to the other, sometimes it works and sometimes I get "ssh: connect to host cuda-host port 22: Connection refused". ("cuda-host" IS the system name I am trying to connect to). I can't decide what causes it to work or not work, but the change only happens when one or both boxes are powered down.

I'm issuing the commands "ssh cuda-host" or "ssh -X cuda-host". I have gotten both versions to work at times (and the remote X window worked also).

Any ideas how I debug ssh?

Thanks,

Craig
 
Old 11-23-2012, 04:15 PM   #2
devil24g
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Rep: Reputation: Disabled
check logs?
 
Old 11-23-2012, 04:22 PM   #3
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,576

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
How are you resolving host names, do you use static IP addresses and /etc/hosts or are you relying on something else?
 
Old 11-23-2012, 09:06 PM   #4
crs17
LQ Newbie
 
Registered: Mar 2004
Posts: 21

Original Poster
Rep: Reputation: 0
I'm using /etc/hosts. Here is the /etc/hosts (and I'm not using ip6):
------
127.0.0.1 localhost
127.0.1.1 crs
192.168.0.101 crs
192.168.0.100 cuda-host

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
------
The /etc/hosts are the same on both systems (except that 127.0.1.1 has the local name
on each system - ie, crs or cuda-host). As to the log files, I don't know where they are.
 
Old 11-24-2012, 08:48 PM   #5
crs17
LQ Newbie
 
Registered: Mar 2004
Posts: 21

Original Poster
Rep: Reputation: 0
I found my logs - under ubuntu 12.04 it is /var/logs/auth.log . On the client, the failed ssh's are noted by:

Code:
Nov 24 20:27:28 crs lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)
Nov 24 20:27:28 crs lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Nov 24 20:27:29 crs lightdm: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "craig"
Nov 24 20:27:35 crs lightdm: pam_unix(lightdm:session): session closed for user lightdm
The second and third line of the above seem incorrect and shouldn't be there.

On the server (cuda-host), I don't have any messages in auth.log at 20:27 +- 3 minutes. So, not surprisingly, the ssh never got through.

At a random time before this ssh attempt there is a line on the client:
Code:
Nov 24 19:50:26 crs polkitd(authority=local): Registered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session2 (system bus name :1.49 [/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1], object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Could this be the cause of the problem? If so, what actually went wrong? Again, on the server there is no corresponding entry. And since I do concurrent "date" commands on the two machines and get approximately the same time, I assume the machine's clock's ARE sync'ed.

Thanks,

Craig
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ssh works in local network, but not over WAN flamelord Linux - Networking 2 08-16-2011 01:09 AM
home folder via network (ssh) LuckyMe Linux - Newbie 2 06-18-2007 09:22 AM
ssh problem over home network sharkus Linux - Networking 4 03-11-2007 08:19 PM
Linux box connects intermittantly to network -- WIERD problem ckr Linux - Networking 7 07-13-2006 06:01 PM
ssh-keygen on network mnt /home ronin1 Linux - Software 4 10-06-2004 02:54 PM


All times are GMT -5. The time now is 09:34 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration