I have the following set-up.

Home pc ---reverse ssh tunnel---> to linux server

The reverse ssh tunnel is set-up so that on my home pc, port 22 is open, but I have nothing currently listening on that port.

My intent was to leave a VNC server running on that port (on my home pc), and have my linux server act as a middle man, so I can VNC into my home pc when I travel. However, I have forgot to start the vnc server.

So I have two questions

1- Is there anything I can do from my end remotely, knowing that port 22 is open on my home pc through the SSH tunnel.

2- Let's assume for a second that port 22 was open to the whole world not just through the SSH tunnel, does this create any vulnerability, knowing that there are no services listening to port 22 on my home pc.

1 Answer 1


If I understand correctly, you did something like this from your home PC:

homepc$  ssh -R2222:localhost:22 remote-linux-server.example.com

So if you connect to port 2222 on that remote linux server it gets forwarded to port 22 on your home computer. You'd normally start VNC on port 22 to let you get a VNC session, but you forgot to start VNC this time.

If that's the case, and there's no SSH daemon or VNC session listening on port 22, there's nothing you can do to connect to your home PC.

Leaving port 22 open to the world without any service listening on that port should not be a security risk (other than announcing the existence of a computer at that IP address), but could possibly be used to execute a DoS attack since it takes some work to respond to a request on a closed port even though no service is listening.

Though I question why you run your VNC server on port 22? Why not run it on some other port, and leave 22 for SSH, then you can forward both port 22 and your VNC port back to your home computer, giving you a way to log in even if VNC isn't running?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .