Re: can sshclient execute a local command ?
- From: "Peter Valdemar Mørch (Lists)" <4ux6as402@xxxxxxxxxxxxxx>
- Date: Fri, 24 Jul 2009 00:53:44 +0200
ProxyCommand is king.
How about this in ~/.ssh/config:
Host secret.server.com
ProxyCommand /some/path/fwknopssh secretfwknopparam %h
Host othersecret.server.com
ProxyCommand /some/path/fwknopssh othersecret %h
And then /some/path/fwknopssh being:
#!/bin/bash
param=$1
host=$2
# Do something with $param, e.g. run fwknop. I just:
echo $param > /tmp/fwknop
nc -w 1 $host 22
I got the "secretfwknopparam" and "othersecret" to end up in /tmp/fwknop before logging in to the servers.
Does that work for you?
Peter
--
Peter Valdemar Mørch
http://www.morch.com
- Follow-Ups:
- Re: [SOLVED] can sshclient execute a local command ?
- From: J. Bakshi
- Re: [SOLVED] can sshclient execute a local command ?
- References:
- 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: [SOLVED] can sshclient execute a local command ?
- Previous by thread: Re: can sshclient execute a local command ?
- Next by thread: Re: [SOLVED] can sshclient execute a local command ?
- Index(es):
Relevant Pages
|