Previously, I had set my my ssh port to 12222 instead of port 22 so that it would be a little harder to find and that worked OK. This week I started adding this port to my onion service so that I could log into ssh via tor and I continuously received this kind of error:
Ncat: Error: Connection refused. ssh_exchange_identification: Connection closed by remote host
I worked on this for two days and this morning I decided to change sshd back to the standard port 22 and updated torrc accordingly and voilĂ it works.
My question is, is this a bug or a known limitation of the tor software?
Best Regards,
Jason
On Wed, 23 Nov 2016 09:11:33 +0000, J. S. Evans wrote:
Previously, I had set my my ssh port to 12222 instead of port 22 so that it would be a little harder to find and that worked OK. This week I started adding this port to my onion service so that I could log into ssh via tor and I continuously received this kind of error:
Ncat: Error: Connection refused. ssh_exchange_identification: Connection closed by remote host
This usually works, and sounds like you mixed up the port numbers involved here. If your line is
HiddenServicePort 22 127.0.0.1:12222
then your sshd needs to listen on port 12222, and the ncat as the ssh proxy command must be pointed to your.onion:22.
Andreas
tor-onions@lists.torproject.org