Ask a Question related to PERL Beginners, Design and Development.
-
Robby Russell #1
Net::SSH::Perl public key issue
Hello,
I am trying to use Net::SSH::Perl to send a few commands to a remote
server and I already have the ssh public keys setup as a normal ssh
user@remotehost command works.
Here is a snip from my code:
[snip]
my @ids = ("/path/to/.ssh/id_rsa.pub");
my %params = (
identity_files => \@ids,
debug => 1,
options => ["StrictHostKeyChecking no"],
);
my $ssh = Net::SSH::Perl->new($server, %params);
if ($debug) {
verboseLog("sshCmd(), server = $server: command = $command");
}
# login with $ssh_user
$ssh->login($ssh_user);
[/snip]
When I run the script I get this:As you can see it's not able to load the public key, although the path> dev: Waiting for server public key.
> dev: Received server public key (768 bits) and host key (1024 bits).
> dev: Host '67.126.xxx.xxx' is known and matches the host key.
> dev: Encryption type: DES3
> dev: Sent encrypted session key.
> dev: Received encryption confirmation.
> dev: RSA authentication failed: Can't load public key.
> dev: RSA authentication failed: Can't load public key.
> dev: Doing challenge response authentication.
> Password:
is correct and it exists.
I performed a strace and got the following, but it's out of my knowledge
base of understanding below the open()
Any thoughts?
[snip]
From the readkey area of the output:
24548
open("/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Term/ReadKey/ReadKey.so",
O_RDONLY) = 5
24548 read(5,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3 20\32"..., 512) = 512
24548 fstat64(5, {st_mode=S_IFREG|0555, st_size=121252, ...}) = 0
24548 old_mmap(NULL, 38200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) =
0x40612000
24548 old_mmap(0x4061b000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 5, 0x8000) = 0x4061b000
24548 close(5) = 0
24548 brk(0) = 0x85a0000
24548 brk(0x85a1000) = 0x85a1000
24548 brk(0) = 0x85a1000
24548 brk(0x85a2000) = 0x85a2000
24548 brk(0) = 0x85a2000
24548 brk(0x85a3000) = 0x85a3000
24548 ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
24548 ioctl(0, SNDCTL_TMR_START, {B38400 opost isig icanon -echo ...}) = 0
24548 ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon -echo
....}) = 0
24548 brk(0) = 0x85a3000
24548 brk(0x85a4000) = 0x85a4000
24548 write(1, "Password: ", 10) = 10
[/snip]
--
#-------------------------------------------------------
# Robby Russell, | Sr. Administrator / Lead Programmer
# Command Prompt, Inc. | [url]http://www.commandprompt.com[/url]
# [email]rrussell@commandprompt.com[/email] | Telephone: (503) 667.4564
#-------------------------------------------------------
Robby Russell Guest
-
Public Service
Subject: THE MEANING OF THE WORD SERVICE At one time in my life, I thought I had a handle on the meaning of the word "service." "The act of... -
About to go public - critcism please
http://www.collierknightwatts.com Please try to break it. Please try to find glitches. Please let me know if you find any holes. Lastly - the... -
File type compatibility issue with Perl
Hey everyone, perhaps someone could shed some light on this issue. I'm writing a script that maintains an addressbook online with a Perl flatfile... -
how to have a gpg public key?
How can i have a gpg public key? -- Thank you, Louie Miranda (louie@axishift.ath.cx) -- To UNSUBSCRIBE, email to... -
Document public
I notice now that on all new pages, it says !Domument public.... At top page. Is this a new thing, and what does it mean? Thanks! Kevs



Reply With Quote

