On Jul 23, 2009, at 12:51 AM, J. Bakshi wrote:
well, using the alias is a brilliant idea, but I have multiple hosts
and they have different fwknop encryption password. That's why I
stored all the server info at .ssh/config file. It would be helpful
if ssh can execute local command for individual host prior to its
connection attempt.
the unix philosophy is "do one thing and do it well". the shell is the
traditional place to handle glue problems like this. e.g., if only one
of your servers needs to be fwknop'd first, something like this:
#!/bin/sh
test "$1" == sekrit.server && fwknop ...
/usr/bin/ssh $*
fill in the server and the fwknop params, name it "ssh", and put it
somewhere ahead of /usr/bin in your PATH.
--
Aaron Davies
aaron.davies@xxxxxxxxx