1

I am looking for way to connect to Linux machine without connecting to it using SSH, Telnet or something similar. The Linux machine is behind a router and I don't have access to it. So opening / closing some ports is not an option. The solution which I am looking for must not use incoming ports. Maybe some socket or I don't know. I can initiate a connection from that machine.

ValeriRangelov
  • 866
  • 7
  • 14

2 Answers2

1

If a network connection is possible from the remote machine to your local machine. You can:

Setup a tunnel using SSH -R from remote-to-local, then use that tunnel to SSH from local-to-remote. See initiate ssh connection from server to client, as suggested above by amarillo.

If networking isn't an option, you can still use:

  1. Enable serial console, i.e login to your system over serial cable (typically RS232). Pull a serial cable between two servers on each side of the router. See Gettys on Serial Consoles (with systemd), or Ubuntu's SerialConsole wiki page

  2. Use a networked Keyboard-Video-Mouse switch (known as KVM over IP). This IPKVM device should be attached to the USB & VGA connector of the remote server on one side and it should be connected to the network on your side of the router. That device let you control the remote keyboard and mouse to control and view what's happening (streaming the video).

0

If you want networking, but do not want to use any ports (I assume this means IP ports and e.g. serial port), then you have to use a protocol that does not use ports. You can use ICMP and Ping Tunnel to forward telnet or ssh through it, or 6to4 (which is assigned its own protocol type 41 and is port-less), or similar measures.

While this answers the question, it might be quite possible that these protocols are blocked as well, and it goes without saying that such measures should not be deployed unless in very unusual situations (maybe with the exception of 6to4).