I am trying to use Net::SSH::W32Perl; I wrote the following test script
use strict; my $host = 'myhost'; my $user = 'user'; my $pass = 'password'; my $cmd = 'ls'; use Net::SSH::W32Perl; my ($ssh, $out, $err, $exit); my %args; $args{debug} = 1; $args{protocol} = 2; $ssh = new Net::SSH::W32Perl($host, %args); $ssh->login($user, $pass); ($out, $err, $exit) = $ssh->cmd("ls"); print "OUT: [$out]\n"; print "ERR: [$err]\n"; print "EXIT: [$exit]\n";
the screen gives the following output then hangs
TODDYCE: Reading configuration data /.ssh/config
TODDYCE: Reading configuration data /etc/ssh_config
TODDYCE: Connecting to myhost, port 22.
TODDYCE: Socket created, turning on blocking...
TODDYCE: Remote protocol version 1.99, remote software version
OpenSSH_3.5p1 FreeBSD-20030201
TODDYCE: Net::SSH::Perl Version 1.25, protocol version 2.0.
TODDYCE: No compat match: OpenSSH_3.5p1 FreeBSD-20030201.
TODDYCE: Connection established.
TODDYCE: Sent key-exchange init (KEXINIT), wait response.
TODDYCE: Algorithms, c->s: 3des-cbc hmac-sha1 none
TODDYCE: Algorithms, s->c: 3des-cbc hmac-sha1 none
TODDYCE: Entering Diffie-Hellman Group 1 key exchange.
TODDYCE: Sent DH public key, waiting for reply.
TODDYCE: Received host key, type 'ssh-dss'.
TODDYCE: Host 'newred.gradwell.net' is known and matches the host key.
TODDYCE: Computing shared secret key.
TODDYCE: Verifying server signature.
TODDYCE: Waiting for NEWKEYS message.
TODDYCE: Enabling incoming encryption/MAC/compression.
TODDYCE: Send NEWKEYS, enable outgoing encryption/MAC/compression.
TODDYCE: Sending request for user-authentication service.
TODDYCE: Service accepted: ssh-userauth.
TODDYCE: Trying empty user-authentication request.
TODDYCE: Authentication methods that can continue:
publickey,password,keyboard-interactive.
TODDYCE: Next method to try is publickey.
TODDYCE: Next method to try is password.
TODDYCE: Trying password authentication.
TODDYCE: Login completed, opening dummy shell channel.
TODDYCE: channel 0: new client-session
TODDYCE: Requesting channel_open for channel 0.
TODDYCE: channel 0: open confirm rwindow 0 rmax 32768
TODDYCE: Got channel open confirmation, requesting shell.
TODDYCE: Requesting service shell on channel 0.
TODDYCE: channel 1: new client-session
TODDYCE: Requesting channel_open for channel 1.
TODDYCE: Entering interactive session.
TODDYCE: Sending command: ls
TODDYCE: Requesting service exec on channel 1.
TODDYCE: channel 1: send eof
TODDYCE: channel 1: open confirm rwindow 131070 rmax 32768
TODDYCE: input_channel_request: rtype exit-status reply 0
TODDYCE: channel 1: rcvd eof
TODDYCE: channel 1: output open -> drain
TODDYCE: channel 1: rcvd close
Has anyone got any idea how I can make this?
if i use $args{protocol} = 1;
then it will work, but i want to use ssh2. thanks anyway!!
In reply to Help...Issue with Net::SSH::Perl Module by toddyce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |