-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I've been playing with the Net:SSH::Perl module and have had success
with it working, except when I try to login to my Redhat Enterprise box
using ssh-keys. I am able to login with keys using the ssh executable,
but not with my little test script, and this appears to be only with
this server. Perhaps there is some sort of incompatibility? Here is my
script:
- -- program begin --
#!/usr/local/bin/perl
use strict;
use Net::SSH::Perl;
my $host = $ARGV[0] || 'server2';
print "Command: ";
chomp(my $cmd=<STDIN>);
$cmd ||= 'ls -alF';
my $ssh = Net::SSH::Perl->new( $host,
~ identity_files =>
[ '/home/user/.ssh/identity' ],
~ debug => 1);
$ssh->login('user');
my ($stdout, $stderr, $exit) = $ssh->cmd($cmd);
print $stdout;
- -- program end --
Here is the debug output:
server1: Reading configuration data /home/user/.ssh/config
server1: Reading configuration data /etc/ssh_config
server1: Connecting to server2, port 22.
server1: Remote protocol version 1.99, remote software
version OpenSSH_3.6.1p2
server1: Net::SSH::Perl Version 1.25, protocol version 1.5.
server1: No compat match: OpenSSH_3.6.1p2.
server1: Connection established.
server1: Waiting for server public key.
server1: Received server public key (768 bits) and host
key (1024 bits).
server1: Host 'server2' is known and matches the host key.
server1: Encryption type: DES3
server1: Sent encrypted session key.
server1: Received encryption confirmation.
server1: RSA authentication failed: Can't load public key.
server1: Doing challenge response authentication.
server1: No challenge presented.
server1: Trying password authentication.
server1: Will not query passphrase in batch mode.
Permission denied at ./ssh.pl line 16
Does anyone have any suggestions?
Thanks.
- --
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
- --
PGP Key: http://server1/~dsc/pgpkey.html
[please encrypt emails to me when possible]
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBUj9/4CrJ04+9SNURApePAJ9cS8VLLvtVgTeIbK8X2bEnL5hSxgCgrGay
+x2ZHKgC2gFtlnc574+AYHA=
=NvIy
-----END PGP SIGNATURE-----
|