7 ms·
Has anyone used ProxyCommand to chain through 2 or more gateways and has a config example to show?
by RRRA 11y ago
Has anyone used ProxyCommand to chain through 2 or more gateways and has a config example to show?
- glandium 11y agoI had one a long time ago, from before ssh -W, which I updated for the occasion: Host <asterisk>+<asterisk> ProxyCommand ssh -W $(echo %h | sed 's/^.<asterisk>+//') $(echo %h | sed 's/+[^+]<asterisk>$//;s/\([^+%%]<asterisk>\)%%\([^+]<asterisk>\)$/\2 -l \1/;s/:\([^:+]<asterisk>\)$/ -p \1/') Use with: $ ssh login1%host1:port1+login2%host2:port2+login3%host3:port3+host4:port4 -l login4 https://glandium.org/blog/?p=3631 https://glandium.org/blog/?p=3631 Edit: there is apparently no way to escape asterisks, so I replaced them with <asterisk> (hopefully I didn't miss one), but you'd better check out the link.
- Piskvorrr 11y agoEssentially, this: http://sshmenu.sourceforge.net/articles/transparent-mulithop.html http://sshmenu.sourceforge.net/articles/transparent-mulithop...