You are not logged in.

#1 2011-12-18 10:44:48

Silvo
Member
Registered: 2011-12-18
Posts: 10

Remote SSH problems

Hi,

I am trying to set up SSH, but have hit a few snags. I've successfully installed and set up sshd, which is running (have checked -- I can ssh into my computer from other computers on my network). I have successfully forwarded port 22 from my router (have checked on canyouseeme.org, port 22 is open, other ports are not), any yet when I try:

ssh username@my-external-ip-address -p 22

it just sits there for ages and eventually times out. There is no further message beyond "connection timed out".

My guess is that either a firewall on Arch is blocking the connection (but I haven't installed any firewalls...), or there is some setting in my sshd config file that is denying connections from everyone (but then surely there would be some kind of message to tell me this beyond timing out?)

Any ideas? I just don't see what the problem could be. Assuming the port-forwarding works (is there any other way to check this?), i just dont see why local internal connections work but external ones dont.

Offline

#2 2011-12-18 11:13:00

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Remote SSH problems

https://wiki.archlinux.org/index.php/Se … ut_Problem

Let us know how far you get through that.

Offline

#3 2011-12-18 11:23:54

Silvo
Member
Registered: 2011-12-18
Posts: 10

Re: Remote SSH problems

Thanks for the reply.

The netstat command shows the following two lines:

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      19101/sshd         
tcp6       0      0 :::22                   :::*                    LISTEN      19101/sshd

so I assume that's working. Stopping iptables fails because iptables isn't started. And then I run that final tcpdump command, and it spits out this initially:

cpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes

And nothing I do will make it give any other output.

So, thoughts? What does all that mean? "If you do not see any output when you attempt to connect, then something outside of your computer is blocking the traffic (e. g., hardware firewall, NAT router etc.)." That would suggest that my router is blocking the traffic, but I have opened that port already, and I don't have a hardware firewall.

Offline

#4 2011-12-18 15:32:16

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Remote SSH problems

It might not work if you are trying from your network, are you trying to connect from the outside?

From other forum posts, that seems to always be the problem.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2011-12-18 19:25:16

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: Remote SSH problems

I would do something like:

  1. Check you can ping the ip address you're trying to connect to.

  2. Run nmap on the ip address to see what ports it has open.

  3. Run ssh verbosely.

  4. Check the logs on both sides.

  5. Use all the knowledge gained from running the previous steps to inform some stfw action.

  6. If it still isn't clear what's wrong after all that, come to the forums.

Offline

#6 2011-12-18 19:43:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Remote SSH problems

/dev/zero wrote:
  1. Run ssh verbosely.

This.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2011-12-18 22:27:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Remote SSH problems

Silvo wrote:

cpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes

And nothing I do will make it give any other output.

The traffic isn't getting from your router to your computer properly then. Double-check your port forwards on the router.

Offline

#8 2011-12-18 22:37:25

Silvo
Member
Registered: 2011-12-18
Posts: 10

Re: Remote SSH problems

R00KIE wrote:

It might not work if you are trying from your network, are you trying to connect from the outside?

That was the problem! Thank you, it works perfectly when I try to connect from outside the network.

That seems a little strange to me, I would have thought that you would be able to connect using the external IP address as well. But not to worry, I can connect both internally and externally now using different addresses, that's not so bad.

Thanks for all the help.

Offline

Board footer

Powered by FluxBB