Its not working for me and I'm using folowing code
#! /usr/local/bin/perl -w use strict; use Net::SSH::Perl; #my $host="192.168.10.32";## remote host IP address my $host="netli01"; ##remote hostname my $usr="venkatas"; ##user login ID my $pass="banu84"; ## user login password ###### set-up remote connection my $ssh = Net::SSH::Perl->new($host, interactive=> 0, debug=> 1, proto +col=> '2,1'); #my $ssh = Net::SSH::Perl->new($host, interactive=> 1, debug=> 1, prot +ocol=> '2,1'); ## This stderr and stdout will help to findout whether the commands ar +e executing or not $ssh->register_handler("stderr", sub { my($channel, $buffer) = @_; print "** Standard Error - I received this:\n", $buffer->byt +es; }); # This trigger works perfectly $ssh->register_handler("stdout", sub { my($channel, $buffer) = @_; print "** Standard Out - I received this:\n", $buffer->byte +s; }); ## remote login authentication $ssh->login($usr,$pass); #$ssh->login(); #my $job2 = $ssh->cmd("set_calico_C1" ); #my $job3 = $ssh->cmd("calico" ); #my $job4 = $ssh->cmd("date" ); #my $job2 = $ssh->cmd('setenv DISPLAY linux37:0'); #my $job3 = $ssh->cmd("bsub -q linux64_idc_1g xterm & " ); ## commands to be executed on remote host my $job1 = $ssh->cmd(<<SHELL); source /home/venkatas/.cshrc; setenv DISPLAY linux37:0; /usr/local/lsf7.0/7.0/linux2.6-glibc2.3-x86/bin/bsub -q linux64_idc_1g + xterm SHELL And the error I'm facing is linux37: Reading configuration data /home/venkatas/.ssh/config linux37: Reading configuration data /etc/ssh_config linux37: Connecting to netli01, port 22. linux37: Remote protocol version 1.99, remote software version OpenSSH +_3.9p1 linux37: Net::SSH::Perl Version 1.34, protocol version 2.0. linux37: No compat match: OpenSSH_3.9p1. linux37: Connection established. linux37: Sent key-exchange init (KEXINIT), wait response. linux37: Algorithms, c->s: 3des-cbc hmac-sha1 none linux37: Algorithms, s->c: 3des-cbc hmac-sha1 none linux37: Entering Diffie-Hellman Group 1 key exchange. linux37: Sent DH public key, waiting for reply. linux37: Received host key, type 'ssh-dss'. linux37: Host 'netli01' is known and matches the host key. linux37: Computing shared secret key. linux37: Verifying server signature. linux37: Waiting for NEWKEYS message. linux37: Send NEWKEYS. linux37: Enabling encryption/MAC/compression. linux37: Sending request for user-authentication service. linux37: Service accepted: ssh-userauth. linux37: Trying empty user-authentication request. linux37: Authentication methods that can continue: publickey,gssapi-wi +th-mic,password. linux37: Next method to try is publickey. linux37: Next method to try is password. linux37: Trying password authentication. linux37: Login completed, opening dummy shell channel. linux37: channel 0: new [client-session] linux37: Requesting channel_open for channel 0. linux37: channel 0: open confirm rwindow 0 rmax 32768 linux37: Got channel open confirmation, requesting shell. linux37: Requesting service shell on channel 0. linux37: channel 1: new [client-session] linux37: Requesting channel_open for channel 1. linux37: Entering interactive session. linux37: Sending command: source /home/venkatas/.cshrc; setenv DISPLAY linux37:0; /usr/local/lsf7.0/7.0/linux2.6-glibc2.3-x86/bin/bsub -q linux64_idc_1g + xterm linux37: Sending command: source /home/venkatas/.cshrc; setenv DISPLAY linux37:0; /usr/local/lsf7.0/7.0/linux2.6-glibc2.3-x86/bin/bsub -q linux64_idc_1g + xterm linux37: Requesting service exec on channel 1. linux37: channel 1: open confirm rwindow 0 rmax 32768 ** Standard Error - I received this: LD_LIBRARY_PATH: Undefined variable. ** Standard Error - I received this: LD_LIBRARY_PATH: Undefined variable. ** Standard Error - I received this: linux37: channel 1: rcvd eof linux37: channel 1: output open -> drain linux37: input_channel_request: rtype exit-status reply 0 linux37: channel 1: rcvd close linux37: channel 1: input open -> closed linux37: channel 1: close_read lsb_init: ** Standard Error - I received this: Failed in an LSF library call: Unable to open file lsf.conf. Job not s +ubmitted. linux37: channel 1: obuf empty linux37: channel 1: output drain -> closed linux37: channel 1: close_write linux37: channel 1: send close linux37: channel 1: full closed
Please help me out in this
Thanks in advanceIn reply to Re^4: Problem while using Net::SSH::Perl module
by venkatas
in thread Problem while using Net::SSH::Perl module
by venkatas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |