SSH jumping over socks(4/5) proxy chain. Host -> socks proxy -> socks proxy -> destination

view story

http://unix.stackexchange.com – I got a great answer for my previous question about connecting from Machine A to Machine C via Socks proxy located on Machine B. Say Machine B Ip is and it is listening on port 1080 The command for that: ssh -o ProxyCommand='socat - socks:,socksport=1080' I wonder if it is possible to make a chain from the socks proxies. Consider scenario: Machine A -> Machine B (Socks proxy 1) -> Machine C (Socks proxy 2) -> Machine D (destination) Machine B IP: PORT 1080 Machine C IP: PORT 3128 Machine D IP: PORT 8080 (HowTos)