Re: can sshclient execute a local command ?
- From: Aaron Davies <aaron.davies@xxxxxxxxx>
- Date: Fri, 24 Jul 2009 01:39:12 +0800
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
- References:
- can sshclient execute a local command ?
- From: J. Bakshi
- Re: can sshclient execute a local command ?
- From: Aarón Mizrachi
- Re: can sshclient execute a local command ?
- From: J. Bakshi
- can sshclient execute a local command ?
- Prev by Date: Re: can sshclient execute a local command ?
- Next by Date: Re: can sshclient execute a local command ?
- Previous by thread: Re: can sshclient execute a local command ?
- Next by thread: Re: can sshclient execute a local command ?
- Index(es):
Relevant Pages
|