You are not logged in.

#1 2012-12-28 16:35:10

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

ssh into server from outside server's local network

So I recently setup a old PC with Arch to serve as an SSH server for my home.  I am so far able to ssh to the server on the local area network.  However, I am yet able to ssh from outside the network.  I have read numerous wiki's but to no avail.  I am aware that you must setup the router to forward connections on the specific port I am using directly to the server.  And I have set it up as such, however still no dice.

Any input on this topic would be greatly appreciated.

Thank you.


In order to understand recursion, one must first understand recursion.

Offline

#2 2012-12-28 16:49:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: ssh into server from outside server's local network

May I use my moderator powers to look up your IP address and then try to connect to your system?

Are you forwarding port 22?
Do you use passwords or key pairs?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2012-12-28 17:07:23

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: ssh into server from outside server's local network

Haha not so sure about that.  But I appreciate the offer.  I am in fact using port 22 for testing purposes but it will soon be changed to a higher port number, and I am using key pairs for authentication.

It is really strange though because I can enable the port forwarding fine, and there is nothing in the router settings blocking the service as far as I know, and yet still nothing.  However, I can connect locally to the server without any problems which leads me to believe it is a problem with the router configuration.


In order to understand recursion, one must first understand recursion.

Offline

#4 2012-12-28 17:20:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: ssh into server from outside server's local network

Well, you may try using ssh with the -vvv (That is three v's -- for very,very verbose)  It may give you hints as to where the problem lies. If you post that output, be sure to check it for security related stuff you may want to redact.

Edit:  Also, your Internet provider may not allow the use of port 22.  Some schools and businesses will block that port.  Port 443 is usually open as it is used for HTTPS.  But -- DON'T DO ANYTHING that is against the rules imposed by your provider -- especially if it is your employer.

Last edited by ewaller (2012-12-28 17:24:40)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2012-12-28 18:02:03

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: ssh into server from outside server's local network

Thanks, I will try this and get back to you.  It is possible that one of the network guys in my office has blocked this port.

I'll let you know how it goes.


In order to understand recursion, one must first understand recursion.

Offline

#6 2012-12-30 01:57:53

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: ssh into server from outside server's local network

This is the output I got.
On my router I am forwarding port 22 to the ssh server.  I have a feeling my ISP is blocking this port but I can't get a hold of them until Monday.

ssh -vvv xxx.xx.xx.xx
OpenSSH_6.1p1.  OpenSSL 1.0.1c 10 May 2012
debug1:  Reading configuration data /etc/ssh/ssh_config
debug2:  ssh_connect:  needpriv 0
debug1:  Connecting to xxx.xx.xx.xx [xxx.xx.xx.xx] port 22
debug1:  connect to address xxx.xx.xx.xx port 22:  Connection timed out
ssh:  connect to host xxx.xx.xx.xx port 22:  Connection timed out 

In order to understand recursion, one must first understand recursion.

Offline

#7 2013-01-02 18:41:06

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: ssh into server from outside server's local network

I just talked to my ISP today and they claim that they do not block the port that I am using.  Currently I am stumped on this issue.


In order to understand recursion, one must first understand recursion.

Offline

#8 2013-01-02 19:08:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: ssh into server from outside server's local network

Try a higher port as you suggested... something with 5 digits.  Make sure you have forwarding setup correctly in your router and that your are now blocking said port on your ssh server (ufw or iptables, etc.).


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2013-01-02 19:44:33

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: ssh into server from outside server's local network

Thanks for the input graysky.  Ill try your suggestions and double check my iptables.


In order to understand recursion, one must first understand recursion.

Offline

#10 2013-01-02 20:02:49

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: ssh into server from outside server's local network

Personally, I'd still look at the port forwarding on your router. testing locally is not the ideal way to test for an external connection, since you will bypass much of the network. So far you've proved that SSH is working, but you haven't proved your network is properly set up.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#11 2013-01-02 20:09:17

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: ssh into server from outside server's local network

I have been testing outside of the server's local network.


In order to understand recursion, one must first understand recursion.

Offline

Board footer

Powered by FluxBB