So, I have 2 vms: "first" and "second". On "first" start hidden tor service on port 1234, this port forward to ssh port on locahost. From "second" i can connect to 1234 and get ssh shell. However, i`l try to create reverse connect from: throw local port "first" connect to local port on "second". Connection established, but when connect on local port "first" failed.

Deatils: "second" - torsocks ssh -C -i priv -v -R -p 80 [email protected]

debug1: remote forward success for: listen, connect
debug1: All remote forwarding requests processed
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
pidr@ubuntu:~$ debug1: client_input_channel_open: ctype forwarded-tcpip rchan 3 win 2097152 max 32768
debug1: client_request_forwarded_tcpip: listen port 2222, originator port 36028
1506591602 ERROR torsocks[4036]: General SOCKS server failure (in socks5_recv_connect_reply() at socks5.c:533)
          debug1: connect_next: host ([]:1000): Connection refused
connect to port 1000 failed: Connection refused

1 Answer 1


So , i solved the problem. Change torsocks to ssh -o "ProxyCommand socat - SOCKS4A:localhost:%h:%p,socksport=9050" and now a can create reverse connect from device to my server.


You must log in to answer this question.

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