Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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}

In reply to Re^3: Is Net::SSH::Perl broken for login via explicit user/password? by shmem
in thread Is Net::SSH::Perl broken for login via explicit user/password? by tphyahoo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (5)
    As of 2014-12-27 08:08 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (176 votes), past polls