[Ssh-sftp-perl-users] Error message when running perl scripts as root...
Brought to you by:
dbrobins
From: CG <cg...@ya...> - 2005-01-06 19:28:40
|
I'm new around here, and I'm not certian if this is expected behavior or not... Running a script as root fails, wheile running a script as a "normal" user succeeds: # cat test_conn.pl #!/usr/bin/perl use Net::SFTP; my $remhost = 'ssh.server.com'; my $username = 'myuser'; my $password = 'myuser'; my $sftp = Net::SFTP->new($remhost, user=>"$username", password=>"$password", debug=>True); # perl test_conn.pl server: Reading configuration data /root/.ssh/config server: Reading configuration data /etc/ssh_config server: Allocated local port 1023. server: Connecting to ssh.server.com, port 22. server: Remote protocol version ., remote software version server: Net::SSH::Perl Version 1.25, protocol version 1.5. server: No compat match: . server: Connection established. Can't locate object method "_session_channel" via package "Net::SSH::Perl::SSH1" at /usr/lib/perl5/site_perl/5.8.2/Net/SFTP.pm line 52. # su - user $ perl test_conn.pl server: Reading configuration data /home/user/.ssh/config server: Reading configuration data /etc/ssh_config server: Connecting to ssh.server.com, port 22. server: Remote protocol version 1.99, remote software version OpenSSH_3.5p1 server: Net::SSH::Perl Version 1.25, protocol version 2.0. server: No compat match: OpenSSH_3.5p1. server: Connection established. server: Sent key-exchange init (KEXINIT), wait response. server: Algorithms, c->s: 3des-cbc hmac-sha1 none server: Algorithms, s->c: 3des-cbc hmac-sha1 none server: Entering Diffie-Hellman Group 1 key exchange. server: Sent DH public key, waiting for reply. server: Received host key, type 'ssh-dss'. server: Host 'ssh.server.com' is known and matches the host key. server: Computing shared secret key. server: Verifying server signature. server: Waiting for NEWKEYS message. server: Enabling incoming encryption/MAC/compression. server: Send NEWKEYS, enable outgoing encryption/MAC/compression. server: Sending request for user-authentication service. server: Service accepted: ssh-userauth. server: Trying empty user-authentication request. server: Authentication methods that can continue: publickey,password,keyboard-interactive. server: Next method to try is publickey. server: Trying pubkey authentication with key file '/home/user/.ssh/id_dsa' server: Authentication methods that can continue: publickey,password,keyboard-interactive. server: Next method to try is publickey. server: Next method to try is password. server: Trying password authentication. server: Login completed, opening dummy shell channel. server: channel 0: new [client-session] server: Requesting channel_open for channel 0. server: channel 0: open confirm rwindow 0 rmax 32768 server: Got channel open confirmation, requesting shell. server: Requesting service shell on channel 0. server: channel 1: new [client-session] server: Requesting channel_open for channel 1. server: Sending subsystem: sftp server: Requesting service subsystem on channel 1. server: channel 1: open confirm rwindow 0 rmax 32768 server: sftp: Sending SSH2_FXP_INIT server: sftp: Remote version: 3 Is something wrong? __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail |