Re: can sshclient execute a local command ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Jul 2009 12:16:46 -0500
Tim Walberg <twalberg@xxxxxxxxxxx> wrote:

> Perhaps this approaches what you're trying to do:
> 
> http://code.google.com/p/ssh-fwknop/

Thanks, a nice wrapper. 
It will help me to a great extend.
many many thanks.


> 
> 
> On 07/22/2009 22:21 +0530, J. Bakshi wrote:
> >>	On Wed, 22 Jul 2009 01:27:14 -0430
> >>	Aar__n Mizrachi <unmanarc@xxxxxxxxx> wrote:
> >>	
> >>	> On Martes 21 Julio 2009 12:29:44 J. Bakshi escribi__:
> >>	> > Hello list,
> >>	> >
> >>	> > I have openssh-client __1:5.1p1-5+b1 installed in my
> >>	> > debian box. I have remote ssh information stored in
> >>	> > my .ssh/config file. I have protected one remote ssh by
> >>	> > fwknop. When I need ssh login to that particular sever
> >>	> > I have to open the port with fwknop client installed in
> >>	> > my local box. Is there any option in sshclient so that
> >>	> > It can execute a local command ( here the fwknop
> >>	> > obviously ) before doing ssh to that remote server ?
> >>	> >
> >>	> > Thanks
> >>	> 
> >>	> You can do something like that defining some alias
> >>	> on /etc/bashrc
> >>	> 
> >>	> alias ssh="function dossh { fwknop -A \"tcp/22\" -s -D
> >>	> \$1; /usr/bin/ssh -l myuser \$1; }; dossh "
> >>	> 
> >>	> Then: ssh myhost
> >>	> 
> >>	> Moreover... for more complex expresion... you can add the
> >>	> user parameter as $2, add if's if you want, or even use
> >>	> the $@ and extract the hostname from the parameters to
> >>	> use it on fwknop and use the rest of the argument on -A
> >>	> and ssh command.
> >>	> 
> >>	> 
> >>	
> >>	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. 
> End of included message
> 
> 
> 

[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux