How to open port 22 of whonix gateway

I tried to make an ssh connection to my raspberry pi through whonix gateway and got this result.

user@disp9900:~$ ssh pi@
kex_exchange_identification: read: Connection reset by peer
Connection reset by port 22

When I tried to connect without whonix gateway, I got this result.

user@disp9900:~$ ssh pi@
The authenticity of host ‘ (’ can’t be established.
ED25519 key fingerprint is SHA256:BMpNend7zrJFKmtJxCbXOyv4jXZ0SL0DxNqFsiNeDiO.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

So I guessed that if I open port 22 of the whonix gateway, I can use it, is that correct?
If so, what is the recommended way to open port 22 of the whonix gateway? I am using QubesOS.

You want to connect to RaspberryPi in your local LAN from within Whonix-Gateway? Assuming yes.

What’s the point?

You don’t need to open any ports as this is simply an outgoing connection. But you must do it using the clearnet user as documented in the wiki.

1 Like

I want to connect my raspberry pi in my house from outside.
i want to use whonix gateway. because i don’t want that free wifi know where I connect. It’s just privacy.
why i can’t connect from gateway?

Then you’ll need an onion service.


The way to anonymously host server ports over Tor is onion services.

Or alternatively: