Apr 182012

Here’s the whole command, with IP address masked:

ssh -A -t "LD_PRELOAD= ssh -A -p 58422 -t \"SSH_AUTH_SOCK=\\\$(find /tmp -user xiehang -a -type s 2>/dev/null | xargs ls -tr | tail -1) ssh -p 58422 -l root $@\""

where is jump host in office, and is jump host in the IDC.

Tricks here: jump host in office is running tsocks, so I have to reset LD_PRELOAD to disable it, and jump host in IDC set default shell to eash (for audit) so I have to setup the ssh agent manually.

It took me 20 minutes to figure out all quotes and backslashes 🙁 .

Sorry, the comment form is closed at this time.