Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Is Net::SSH::Perl broken for login via explicit user/password?

by shmem (Canon)
on Dec 19, 2006 at 10:10 UTC ( #590632=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Is Net::SSH::Perl broken for login via explicit user/password?
in thread Is Net::SSH::Perl broken for login via explicit user/password?

Well... running that code confirms what I wrote. Log follows.

qwurx [shmem] 10:59 ~/perlmonks > perl ssh-cmd.pl Enter a host name to connect to: [qwurx] Enter the port number of the remote sshd: [ssh] Choose a cipher from the list: [1] IDEA [2] DES [3] DES3 [5] RC4 [6] Blowfish Enter a number: [1] qwurx: Reading configuration data /home/shmem/.ssh/config qwurx: Reading configuration data /etc/ssh_config qwurx: Connecting to qwurx, port 22. qwurx: Remote protocol version 1.99, remote software version OpenSSH_4 +.2 qwurx: Net::SSH::Perl Version 1.29, protocol version 2.0. qwurx: No compat match: OpenSSH_4.2. qwurx: Connection established. Enter your username on that host: [shmem] And your password: qwurx: Sent key-exchange init (KEXINIT), wait response. qwurx: Algorithms, c->s: 3des-cbc hmac-sha1 none qwurx: Algorithms, s->c: 3des-cbc hmac-sha1 none qwurx: Entering Diffie-Hellman Group 1 key exchange. qwurx: Sent DH public key, waiting for reply. qwurx: Received host key, type 'ssh-dss'. qwurx: Permanently added 'qwurx' to the list of known hosts. qwurx: Computing shared secret key. qwurx: Verifying server signature. qwurx: Waiting for NEWKEYS message. qwurx: Enabling incoming encryption/MAC/compression. qwurx: Send NEWKEYS, enable outgoing encryption/MAC/compression. qwurx: Sending request for user-authentication service. qwurx: Service accepted: ssh-userauth. qwurx: Trying empty user-authentication request. qwurx: Authentication methods that can continue: publickey,keyboard-in +teractive. qwurx: Next method to try is publickey. qwurx: Publickey: testing agent key '/home/shmem/.ssh/id_rsa' qwurx: Authentication methods that can continue: publickey,keyboard-in +teractive. qwurx: Next method to try is publickey. qwurx: Publickey: testing agent key '/home/shmem/.ssh/id_dsa' qwurx: Authentication methods that can continue: publickey,keyboard-in +teractive. qwurx: Next method to try is publickey. qwurx: Trying pubkey authentication with key file '/home/shmem/.ssh/id +_dsa' qwurx: Will not query passphrase for '/home/shmem/.ssh/id_dsa' in batc +h mode. qwurx: Loading private key failed. Permission denied at ssh-cmd.pl line 43

and with line 116 in Net::SSH::Perl::AuthMgr commented out:

qwurx [gm] 11:01 ~/perlmonks > perl ssh-cmd.pl Enter a host name to connect to: [qwurx] Enter the port number of the remote sshd: [ssh] Choose a cipher from the list: [1] IDEA [2] DES [3] DES3 [5] RC4 [6] Blowfish Enter a number: [1] qwurx: Reading configuration data /home/shmem/.ssh/config qwurx: Reading configuration data /etc/ssh_config qwurx: Connecting to qwurx, port 22. qwurx: Remote protocol version 1.99, remote software version OpenSSH_4 +.2 qwurx: Net::SSH::Perl Version 1.29, protocol version 2.0. qwurx: No compat match: OpenSSH_4.2. qwurx: Connection established. Enter your username on that host: [shmem] And your password: qwurx: Sent key-exchange init (KEXINIT), wait response. qwurx: Algorithms, c->s: 3des-cbc hmac-sha1 none qwurx: Algorithms, s->c: 3des-cbc hmac-sha1 none qwurx: Entering Diffie-Hellman Group 1 key exchange. qwurx: Sent DH public key, waiting for reply. qwurx: Received host key, type 'ssh-dss'. qwurx: Host 'qwurx' is known and matches the host key. qwurx: Computing shared secret key. qwurx: Verifying server signature. qwurx: Waiting for NEWKEYS message. qwurx: Enabling incoming encryption/MAC/compression. qwurx: Send NEWKEYS, enable outgoing encryption/MAC/compression. qwurx: Sending request for user-authentication service. qwurx: Service accepted: ssh-userauth. qwurx: Trying empty user-authentication request. qwurx: Authentication methods that can continue: publickey,keyboard-in +teractive. qwurx: Next method to try is publickey. qwurx: Publickey: testing agent key '/home/shmem/.ssh/id_rsa' qwurx: Authentication methods that can continue: publickey,keyboard-in +teractive. qwurx: Next method to try is publickey. qwurx: Publickey: testing agent key '/home/shmem/.ssh/id_dsa' qwurx: Authentication methods that can continue: publickey,keyboard-in +teractive. qwurx: Next method to try is publickey. qwurx: Trying pubkey authentication with key file '/home/shmem/.ssh/id +_dsa' qwurx: Will not query passphrase for '/home/shmem/.ssh/id_dsa' in batc +h mode. qwurx: Loading private key failed. qwurx: Next method to try is keyboard-interactive. Password: qwurx: Login completed, opening dummy shell channel. qwurx: channel 0: new [client-session] qwurx: Requesting channel_open for channel 0. qwurx: channel 0: open confirm rwindow 0 rmax 32768 qwurx: Got channel open confirmation, requesting shell. qwurx: Requesting service shell on channel 0. Enter a command to execute: [ls -l] qwurx: channel 1: new [client-session] qwurx: Requesting channel_open for channel 1. qwurx: Entering interactive session. qwurx: Sending command: ls -l qwurx: Requesting service exec on channel 1. qwurx: channel 1: open confirm rwindow 0 rmax 32768 qwurx: channel 1: window 9216 sent adjust 23552 qwurx: channel 1: rcvd eof qwurx: channel 1: output open -> drain qwurx: input_channel_request: rtype exit-status reply 0 qwurx: channel 1: rcvd close qwurx: channel 1: input open -> closed qwurx: channel 1: close_read qwurx: channel 1: obuf empty qwurx: channel 1: output drain -> closed qwurx: channel 1: close_write qwurx: channel 1: send close qwurx: channel 1: full closed total 1733104 ... (file list follows)

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}


Comment on Re^3: Is Net::SSH::Perl broken for login via explicit user/password?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://590632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-07-04 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls