RE: [Ssh-sftp-perl-users] Confirmation neede by a script.
Brought to you by:
dbrobins
From: Sander P. <San...@da...> - 2006-03-24 19:07:37
|
Christophe, =20 there is an example in the package that deals with this sort of thing. You basically set up custom handlers for incoming data. I could not get it to work though so I reverted to using Net::telnet for that situation. Perhaps Net::SSH2 is better suited? =20 Sander ________________________________ From: ssh...@li... [mailto:ssh...@li...] On Behalf Of Christophe CHAMPENOIS Sent: Friday, March 24, 2006 9:19 AM To: ssh...@li... Subject: [Ssh-sftp-perl-users] Confirmation neede by a script. Hi =20 Now, I can connet to my host with my perl script (and Net::ssh::perl). I can also execute a script. =20 My script looks like this =20 my $ssh =3D Net::SSH::Perl->new($host); $ssh->login($user,$pass); my($stdout, $stderr, $exit) =3D $ssh->cmd("mycommand"); =20 But when mycommand is executed, it asks a confirmation. If I execute mycommand locally: # ./mycommand Are you sure you want to proceed? . So, I have to respond yes to this message. How can I respond to that? Is it possible? =20 Thanks =20 |