Apr 182012
 

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


ssh -A -t 111.111.111.111 "LD_PRELOAD= ssh -A -p 58422 222.222.222.222 -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 111.111.111.111 is jump host in office, and 222.222.222.222 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 🙁 .

Apr 182012
 

I installed tsocks on OSX through macport and it kept reporting “Segmentation fault: 11” for whatever command I issue, later on turned out I need to put “tordns_enable = false” in tsocks.conf to solve the problem.

Don’t know why, and I told myself – don’t dig into things that don’t matter your core business, hehe.