I have set up an onion service on a machine (running Ubuntu Server 22.04) that provides both web and SSH access, such that this is the torrc:
HiddenServicePort 80 127.0.0.1:80
HiddenServicePort 22 127.0.0.1:22
If I go to
myservice.onion in Tor browser on any operating system, the website loads successfully, and when I run the following command on Linux I can login successfully:
ssh -o ProxyCommand="/usr/bin/nc -xlocalhost:9050 -X5 %h %p" [email protected]
I can also login successfully if I define settings for
*.onion hosts in my
~/.ssh/config file, therefore logging in through SSH on Linux is not a problem.
However, I am unable to login on windows using the above command (since
/usr/bin/ is not a valid directory), so I tried to use PuTTY (I have release 0.76 installed) to login. I read this question, which seems to have no answers, as well as the Tor project PuTTY guide, which said to configure the proxy settings such that PuTTY is using a SOCKS5 proxy,
Proxy hostname is
localhost, the port is
9050, DNS name lookup is set to
yes, and the Telnet command field contains
connect %host %port\n.
When I configure those exact settings, as you can see here and here, I simply get this error. (I have the latest version of Tor Browser for Windows running while PuTTY is running, so the localhost proxy should work).
My question is, how do I connect to my onion service via PuTTY? Alternatively, is there any other way to connect to it via SSH on Windows?