You are not logged in.

#1 2016-12-31 22:56:41

zabzob
Member
Registered: 2016-12-31
Posts: 1

Possible to connect to SSH server running on a mobile hotspot?

I'm trying to use SSH to login remotely to a laptop connected to a 4g mobile hotspot. I'm using the ssh command with ip address, but the ssh client isn't connecting even though the server is running on the laptop. Is it possible to connect remotely in this way to a computer on a mobile hotspot? Or does it have to be connected to a router?

Offline

#2 2017-01-01 06:04:17

Xeanto
Member
Registered: 2016-11-02
Posts: 7

Re: Possible to connect to SSH server running on a mobile hotspot?

What needs to happen is that you may have A) A firewall running on the machine, so you might need someone there to fix that for you or B) you don't have port (x) forwarded for SSH, so that means you won't be able to connect.
To find out if you can connect to it at all, you will want to check the open ports that you are trying to reach:
$ nc -zv [ip] (x) [22 for SSH]
OR - sshd isnt running, so you might have to start it on the remote connection.
$ sudo systemctl restart sshd

Offline

#3 2017-01-01 14:38:02

Pineman13
Member
Registered: 2016-12-04
Posts: 26

Re: Possible to connect to SSH server running on a mobile hotspot?

You'd have to do a reverse SSH:
https://serverfault.com/questions/34119 … ssh-tunnel
Where you forward your hotspot's(server) SSH port(22) to some local(say, 13111) port on your machine.
Let's designate our client as A and our hotspot as B.
So if I want to do so, I'd:
1. Setup an SSHd on A;
2. Setup a script on B that would via SSH tunnel forward B's(localhost, 22) port to A(<client's ip>, 13111) port;
3. SSH from A to A(locahost) on port 13111;
4. ?????
5. You're ssh'ed to B via the tunnel!!!

Offline

Board footer

Powered by FluxBB