RE: [Ssh-sftp-perl-users] ssh with public keys?
Brought to you by:
dbrobins
From: Shapiro, D. <dav...@it...> - 2004-06-03 12:43:57
|
Thanks for pointing me in the right direction.. I did a search on identity_files and Net::SSH:Perl and found a journal article with an example. It lookslike PreferredAuthentications option helped out. The final code example is as follows: use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new( "falcon", options => [ "RhostsRSAAuthentication yes", "HostbasedAuthentication yes", #"UsePrivilegedPort yes", "PreferredAuthentications publickey,hostbased,password,keyboard-interactive", "EnableSSHKeysign yes" ] ); $ssh->login("nagios"); my ($out,$err,$rc) = $ssh->cmd("ls -la"); print "out: $out\n"; -----Original Message----- From: Dave Rolsky [mailto:au...@ur...] Sent: Wednesday, June 02, 2004 5:57 PM To: Shapiro, David Cc: 'ssh...@li...' Subject: Re: [Ssh-sftp-perl-users] ssh with public keys? On Wed, 2 Jun 2004, Shapiro, David wrote: > Is there a way to have Net::SSH::Perl run using the public key with no > passphrase I set up? > > i tried commenting out login, but that did not work. I tried just > using $ssh->login($user), but that fails too. Is there some way I > have to set up the new object to allow me to use public key/no passphrase logins? Check out the identity_files option which can be passed to the new() method. I think that will do what you want. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |