You are not logged in.

#1 2017-05-12 19:14:30

Panadestein
Member
From: Lille, France
Registered: 2017-04-08
Posts: 51

SSH connection in a public network

Hello fellows!

I writing you after long hours dealing with this issue (and learning at the same time), I think I have reached a point where I need a clue. Long story short: I want to connect my Android (which is running Arch in a chroot environment, thanks to Linux deploy app) and my Arch desktop. Why? Because it's interesting and allows me to manipulate a bunch of Android stuff remotely.

I have tried several approaches to do this, one of my previous post shows the most obvious one, which failed because I can't create a hotspot in my phone neither in my PC (that's is really bad luck, I know). The second one succeeded, but it's not what I'm looking for, because it works using either USB tethering or ADB shell (no wireless). And the last one, which I'm currently fighting for: I want to stablish a wireless connection via SSH.

Now, I'm living in a student's residence, whose network is "open" (as in several malls etc.) and distributed by several routers in the same building. I have tried creating the server in the Phone and in the PC (both connected to the same network and also different ones), using external and internals IP addresses in the ssh command, and I get connection time out in the fist one, and not reachable in the second one. My firewall in the desktop configured  following guide, but I'm afraid I don't have access to any of the routers, so my question is: Is this issue related with the router's firewall, and I have no option, or can I use some other trick to get the connection?

Thank you very much in advance.


python -c 'import this' | awk 'NR == 5'

Offline

#2 2017-05-12 19:26:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: SSH connection in a public network

Panadestein wrote:

so my question is: Is this issue related with the router's firewall

Most likely.  They may not allow traffic on port 22. (editted per the below comment)

But you could do a few more tests to confirm that you indeed have the correct IP address.  First I'd go to any "what's my IP" site to ensure you have the proper external IP address.  Then I might try pinging the IP and/or nmap the IP address.  If you can reach other services on the devices (e.g. an http server on port 80) then that would confirm the network is blocking port 22.

Last edited by Trilby (2017-05-12 19:29:05)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-05-12 19:28:33

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: SSH connection in a public network

Trilby wrote:

Most likely.  They may not allow traffic on port 20.

What Trilby meant to say was 'They may not allow traffic on port 22'.

Last edited by Slithery (2017-05-12 19:28:48)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2017-05-12 19:52:24

Panadestein
Member
From: Lille, France
Registered: 2017-04-08
Posts: 51

Re: SSH connection in a public network

Trilby wrote:

Then I might try pinging the IP and/or nmap the IP address.

Thanks for the quick reply! Yes I have found the external IP address of the desktop with https://myexternalip.com/ and I'm able to ping it from Android, so I think that's it.


python -c 'import this' | awk 'NR == 5'

Offline

#5 2017-05-12 20:28:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: SSH connection in a public network

Then I'd try `nmap XX.XX.XX.XX` filling in the IP for the address.

If the routers/network is blocking ssh, then port 22 will show as "closed".  This is not - however - a perfect test, as port 22 will also show as closed if you've not properly configured your ssh server (and/or firewall).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-05-12 20:38:22

Panadestein
Member
From: Lille, France
Registered: 2017-04-08
Posts: 51

Re: SSH connection in a public network

Trilby wrote:

Then I'd try `nmap XX.XX.XX.XX` filling in the IP for the address.

This is the output:

[panadestein@rpanades-OptiPlex-755 ~]$ nmap xx.xx.xx.xx

Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-12 22:33 CEST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.08 seconds

The option -Pn just times out.


python -c 'import this' | awk 'NR == 5'

Offline

#7 2017-05-12 20:52:48

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: SSH connection in a public network

It could be that whoever runs the network is blocking SSH, it's worth checking with them to make sure.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2017-05-13 00:52:49

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: SSH connection in a public network

slithery wrote:

It could be that whoever runs the network is blocking SSH, it's worth checking with them to make sure.

They often do. Run your ssh server on port 443, or 53, and try that.

Last edited by bulletmark (2017-05-13 00:53:49)

Offline

Board footer

Powered by FluxBB