You are not logged in.

#1 2012-07-10 22:14:55

sfabius
Member
Registered: 2007-07-07
Posts: 157

can't ssh between 2 arch machines over LAN

I have two arch machines wirelessly connected to a router (Buffalo Airstation). I have set up sshd on machine A and am trying to ssh in from machine B. I can ping both machines from the other. I get a 'connection timed out error' and cannot connect. I followed some of the ssh troubleshooting tips on the wiki, and when I use tcpdump on machine A and get no traffic, even when I ping (and on B I get no packet loss). I am now totally flummoxed and would appreciate help.

Offline

#2 2012-07-11 08:19:53

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: can't ssh between 2 arch machines over LAN

Could you briefly describe your network setup (involved ip's,...) and post the output of "ssh -v <machineA>"?

Also, are you able to ssh locally on machineB (ssh -v localhost)?


Burninate!

Offline

#3 2012-07-11 08:45:49

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: can't ssh between 2 arch machines over LAN

Machine A:

test that sshd is started :

 ps -ef | grep ss[h]d

test that the tcp port is open:

 netstat -ntlp | grep sshd

test that your iptables are down or properly setup:

 iptables -F (flush iptables)

try to ssh localhost:

 ssh -v localhost 

https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#4 2012-07-11 09:00:14

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

Re: can't ssh between 2 arch machines over LAN

I wonder if you have any firewall enable by chance...

Last edited by msx (2012-07-11 12:00:43)


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

#5 2012-07-11 10:57:28

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: can't ssh between 2 arch machines over LAN

Thanks everyone. No firewall, no iptables. I can ssh into localhost.
Results of netstat:

[root]# netstat -ntlp | grep sshd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1154/sshd           
tcp6       0      0 :::22                   :::*                    LISTEN      1154/sshd           

I'm thinking it might be something to do with the router or machine B. I have B connected to wireless and it has an ipaddress but I can't get out to the internet.

Offline

#6 2012-07-11 11:18:52

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: can't ssh between 2 arch machines over LAN

Thats two different problems.

a. ssh connection on local vlan (ethernet network)

If you are trying via the local address (eg. 192.168.x.x) then you should have any problem.
The router doesnt act as a gateway on ethernet.

b. access to internet
In this case the router act as a gateway.
Check the dns resolving and routing table on machive B


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#7 2012-07-11 11:51:31

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: can't ssh between 2 arch machines over LAN

OK, then the router is not the problem (although both machines are going through wireless connections). At this point I just want to ssh between these two machines.

Offline

#8 2012-07-11 11:53:36

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: can't ssh between 2 arch machines over LAN

Its time for :

ip a 
ip r

on both machines


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#9 2012-07-11 12:06:46

sfabius
Member
Registered: 2007-07-07
Posts: 157

Re: can't ssh between 2 arch machines over LAN

Machine B:

[root]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:1c:7e:28:8c:ae brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:21:5c:18:0e:cb brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.13/24 brd 192.168.11.255 scope global wlan0
    inet6 fe80::221:5cff:fe18:ecb/64 scope link 
       valid_lft forever preferred_lft forever
[root]# ip r
default via 192.168.11.1 dev wlan0  metric 303 
192.168.11.0/24 dev wlan0  proto kernel  scope link  src 192.168.11.13  metric 303 

Machine A (eth1 is wireless interface):

[root]#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: irda0: <NOARP> mtu 2048 qdisc noop state DOWN qlen 8
    link/irda 00:00:00:00 brd ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:0d:60:d0:20:ed brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0e:35:7b:2c:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.9/24 brd 192.168.11.255 scope global eth1
    inet6 fe80::20e:35ff:fe7b:2c60/64 scope link 
       valid_lft forever preferred_lft forever
[root]# ip r
default via 192.168.11.1 dev eth1  metric 304 
192.168.11.0/24 dev eth1  proto kernel  scope link  src 192.168.11.9  metric 304 

Offline

Board footer

Powered by FluxBB