3 ms·
I 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
by glandium 11y ago
I 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.