E
E
elyd2021-07-28 19:14:32
SSH
elyd, 2021-07-28 19:14:32

The ssh tunnel is not working correctly. Why?

There is a PC, on it you need to run one or another server, its ip is "gray".
The solution that came and did not reach the end:
I take a cheap VPS, it acts as an ssh server. (I googled everything, sort of set it up)
I switch ports by running ssh on the PC:

ssh -R <порт VPS>:localhost:<порт на ПК> <имя пользователя>@<ip VPS'а> -i <ключ>

PC port - 80 (firewall is off)
VPS port - 8000 (open, 80 was not thrown at the same time it was not busy on the VPS) I
check the connection on the VPS with the command:
sudo lsof -i :8000
Issues:
sshd    2477 ubuntu   10u  IPv4  43231      0t0  TCP *:8000 (LISTEN)
sshd    2477 ubuntu   11u  IPv6  43232      0t0  TCP *:8000 (LISTEN)

I conclude that everything works.
To check, I run openserver: on the local network - it works, on ipVPS'a: 8000 - it does not work.
Gentlemen experts, what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2021-07-28
@gbg

Firewalls, firewalls, blablabla. And the asterisk is missing:

ssh -R *:<порт VPS>:localhost:<порт на ПК> <имя пользователя>@<ip VPS'а> -i <ключ>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question