3 ms·
Chain three of them together, and you have a TOR-like circuit. Of course, since SSH doesn't work as a SOCKS5 client (last time I checked, at least), you'd have
by Joker_vD 7y ago
Chain three of them together, and you have a TOR-like circuit. Of course, since SSH doesn't work as a SOCKS5 client (last time I checked, at least), you'd have to forward some local ports to remote 22's and point SSH clients at localhost (forcing them to check the specific host key is also a fun challenge). Sadly, SSH doesn't support using port 0 for chosing a random local port.
ssh -L 60001:host2:22 -N user1@host1 &
ssh -L 60002:host3:22 -p 60001 -N user2@localhost &
ssh -D 8000 -p 60002 -N user3@localhost &
- wahern 7y ago> SSH doesn't work as a SOCKS5 client 1) That's what the ProxyCommand config option is for. Most systems will have netcat or nc installed which do provide SOCKS client support 2) Or just use the -J option argument, which IIRC was originally implemented as a transformation to -oProxyCommand='ssh ... [netcat/nc]' but now is a simple transformation to the newer -W option argument, which doesn't depend on netcat/nc being installed on the intermediate host.
- Joker_vD 7y agoWhen I was looking into this problem neither -J nor -W options existed (that was a really long time ago).