7
7
7761662021-05-07 13:17:05
linux
776166, 2021-05-07 13:17:05

How to connect to ssh/VPN from a non-standard port to an external server?

There is a server behind a firewall with all ports forbidden, except for some. The firewall setting is not available.
http requests go through (ports 80/443 are open), but ssh fails to connect.

Let's say there is port 8888 guaranteed to be open on the firewall. How can I connect via ssh to an external server using it?

The same question about connecting to a VPN on an arbitrary port.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2021-05-07
@776166

It looks like you did not understand how the firewall is configured.
If only port 8888 was open outside, you could not connect anywhere at all, because any connection outside uses a random free port to establish a session.
For example, you use a browser to go to a remote http-80 server, your browser opens some port 26482 locally.
Therefore, I assume that port 8888 is open on the contrary for listening, and you need to configure sshd so that it listens on port 8888.

U
unseriously, 2021-05-07
@unseriously

To connect on port 8888, ssh must listen on this port - in order for ssh to listen on this port, in the ssh settings (/etc/ssh/sshd_config) you must specify to listen on this port
The same about spn

S
Sergei Nazarenko, 2021-05-07
@nazares

Read about ssh tunneling

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question