Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Net::SFTP::Foreign mod perl

by scoobyrico (Beadle)
on May 22, 2009 at 03:49 UTC ( [id://765599]=note: print w/replies, xml ) Need Help??


in reply to Re: Net::SFTP::Foreign mod perl
in thread Net::SFTP::Foreign mod perl

OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to ftp.****.com [***.***.***.***] port 22. debug1: Connection established. debug1: identity file /home/apache/.ssh/identity type -1 debug1: identity file /home/apache/.ssh/id_rsa type 1 debug1: identity file /home/apache/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version VShell_2_ +5_1_219 VShell debug1: no match: VShell_2_5_1_219 VShell debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'ftp.*****.com' is known and matches the DSA host key. debug1: Found key in /home/apache/.ssh/known_hosts2:1 DSA host key for IP address '***.***.***.***' not in list of known hos +ts. debug1: ssh_dss_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: password,publickey,gssapi-w +ith-mic debug1: Next authentication method: gssapi-with-mic debug1: An invalid name was supplied Unknown code krb5 243 debug1: An invalid name was supplied Unknown code krb5 243 debug1: An invalid name was supplied Unknown code krb5 243 debug1: Next authentication method: publickey debug1: Trying private key: /home/apache/.ssh/identity debug1: Offering public key: /home/apache/.ssh/id_rsa debug1: Authentications that can continue: password,publickey,gssapi-w +ith-mic debug1: Trying private key: /home/apache/.ssh/id_dsa debug1: Next authentication method: password #13647 queueing msg len: 5, code:1, id:3 ... [1] 00 00 00 05 01 00 00 00 03 + | ......... #13647 waiting for message... [1] #13647 _do_io connected: 1 #13647 _do_io select(-,-,-, undef) #13647 _do_io write queue: 9, syswrite: undef, max: 20480 #13647 _conn_lost #13647 _set_status code: 7, str: Connection lost #13647 _set_err code: 37, str: Connection to remote server is broken #13647 _conn_lost ####################### Connected ####################### #13647 queueing msg len: 10, code:11, id:0 ... [2] 00 00 00 0a 0b 00 00 00 00 00 00 00 01 2e + | .............. #13647 waiting for message... [2] #13647 _do_io connected: 0 #13647 _conn_lost #13647 new remote dir '.' open, rid: #13647 queueing msg len: 29, code:3, id:1 ... [3] 00 00 00 1d 03 00 00 00 01 00 00 00 08 66 69 6c 65 2e 74 78 74 00 00 0 +0 1a 00 00 00 04 00 00 01 | .............file.txt........... a4 + | . #13647 waiting for message... [3] #13647 _do_io connected: 0 #13647 _conn_lost #13647 _set_status code: 7, str: Connection lost #13647 _set_err code: 37, str: Connection to remote server stalled #13647 new remote file 'file.txt' open, rid: ####################### Successful ####################### #13647 Net::SFTP::Foreign=HASH(0x55557f9b8e30)->DESTROY called (curren +t pid: 13647, disconnect_by_pid: ) #13647 Net::SFTP::Foreign=HASH(0x55557f9b8e30)->disconnect called (ssh + pid: 13655) #13647 _conn_lost debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = C debug1: Sending subsystem: sftp debug1: channel 0: free: client-session, nchannels 1 debug1: fd 0 clearing O_NONBLOCK debug1: fd 1 clearing O_NONBLOCK debug1: fd 2 clearing O_NONBLOCK debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status -1
Thank you!

Replies are listed 'Best First'.
Re^3: Net::SFTP::Foreign mod perl
by salva (Canon) on May 22, 2009 at 09:11 UTC
    Something is going wrong on the password authentication process... it looks like ssh does not see the password until its /dev/tty stream is closed.

    Can you trace the script at the OS level with strace (or similar) to see the data being exchanged between the module and the ssh process? Ensure that the full data is dumped (i.e. strace -s 100000 ...).

    You may need to remove sensible information as passwords from the dump.

    Which module version, perl version and OS are you using?

      I really appreciate your help with this. The sys admins are changing apache to run a single thread and I'll post that when I get it.
      [sandbox common]$ perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. [sandbox common]$ uname -a Linux *****.com 2.6.18-8.1.8.el5 #1 SMP Tue Jul 10 06:39:17 EDT 2007 x +86_64 x86_64 x86_64 GNU/Linux [@sandbox common]$ cat /etc/issue CentOS release 5 (Final) Kernel \r on an \m kernel: 2.6.18-92.1.22 (CentOS 5.2 - RHEL clone, x86_64) perl: 5.8.8 perl-Net-SSH: 0.08 perl-Net-SFTP: 0.10 Apache: 2.2.3 mod_perl: 2.0.4

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-03-29 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found