How do I ssh to a hidden service with torsocks
? Manual for torsocks
says that ssh should work just fine yet it doesn't. It fails with the following:
$ torsocks ssh [email protected]
get_sock_port: getnameinfo NI_NUMERICSERV failed: ai_family not supported
Is it even remotely possible to use torsocks
in this case?
Sure, if I add an explicit proxy definition to the .ssh/config
, ssh to this host works just fine, but I'd prefer to use torsocks
because I not always can or want to modify .ssh/config
like follows.
Host *.onion
ProxyCommand /bin/nc.openbsd -xlocalhost:9050 -X5 %h %p
But that's not what I want.
"WARNING torsocks[17541]: [connect] Connection to a local address are denied since it might be a TCP DNS query to a local DNS server. Rejecting it for safety reasons."
this is happening because you've probably still got ssh configured to usenc
to proxy, causing a conflict. do you have any other options set, like are you trying to forward ports or X11?