veeruch has asked for the wisdom of the Perl Monks concerning the following question:
yes it is wroking fine,giving the out put alsouse Net::SSH::W32Perl; my $ssh = Net::SSH::W32Perl->new($host,use_pty => 0,); $ssh->login($user, $pass); my $Command="ls -lrt"; my($stdout, $stderr, $exit) = $ssh->cmd($Command); print "$stdout";
sub ConnectSSH { print LOG " [FunctionName][ConnectSSH] \n"; my $ClearCaseSSHObject = Net::SSH::W32Perl->new($host,use_pty => +0,debug=>1); if($ClearCaseSSHObject) { if(!$ClearCaseSSHObject->login('$user','$password') ) { print LOG " Unable to connect SSH \n"; &ErrorNotification(ERR_LOGIN_TITLE,ERR_LOGIN_MSG); $MainScreenObject -> Unbusy( -recurse => '1' ) +; return(0); } else { print LOG "connected Sucesfully"; } } else { print LOG " Unable to connect network \n"; &ErrorNotification("ERR_CON_TITLE","ERR_CON_MSG"); } #For retrieving SSHobject decalring globally $ClearCaseSSHObjectRef = $ClearCaseSSHObject; return($ClearCaseSSHObjectRef); }
indamaaaf31786: Reading configuration data /.ssh/config indamaaaf31786: Reading configuration data /etc/ssh_config indamaaaf31786: Connecting to host, port 22. indamaaaf31786: Socket created, turning on blocking... indamaaaf31786: Remote protocol version 2.0, remote software version OpenSSH_3.7.1p2-pwexp26 "makerandom" is not exported by the Crypt::Random module at E:/perl/site/lib/Crypt/Random/Generator.pm line 12 "makerandom_itv" is not exported by the Crypt::Random module at E:/perl/site/lib/Crypt/Random/Generator.pm line 12 "makerandom_octet" is not exported by the Crypt::Random module at E:/prl/site/lib/Crypt/Random/Generator.pm line 12 Tk::Error: Can't continue after import errors at E:/perl/site/lib/Crypt/Random/Generator.pm line 12 BEGIN failed--compi +lation aborted at E:/perl/site/lib/Crypt/Random/Generator.pm line 12, <GEN2> line 1. Compilation failed in require at E:/perl/site/lib/Crypt/Random.pm line 18, <GEN2> line 1. BEGIN failed- +-compilation aborted at E:/perl/site/lib/Crypt/Random.pm line 18, <GEN2> line 1. Compilation f +ailed in require at E:/perl/site/lib/Crypt/DH.pm line 6, <GEN2> line 1. BEGIN failed--comp +ilation aborted at E:/perl/site/lib/Crypt/DH.pm line 6, <GEN2> line 1. Compilation failed + in require at E:/perl/site/lib/Net/SSH/Perl/Kex/DH1.pm line 13, <GEN2> line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/Perl/Kex/DH1.pm line 13, <GEN2> line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl/Kex.pm line 6, <GEN2> line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/Perl/Kex.pm line 6, <GEN2> line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl/SSH2.pm line 6, <GEN2> line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/Perl/SSH2.pm line 6, <GEN2> line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/W32Perl/SSH2.pm line 7, <GEN2> line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/W32Perl/SSH2.pm line 7, <GEN2> line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl.pm line 55, <GEN2> line 1. Crypt::Random +::BEGIN at E:/perl/site/lib/Crypt/Random.pm line 18 Crypt::DH::BEGIN at E:/perl/site/lib/Crypt/DH.pm line 6 Net::SSH::Perl::Kex::DH1::BEGIN at E:/perl/site/lib/Net/SSH/Perl/Kex/DH1.pm line 13 Net::SSH::Perl::Kex:: +BEGIN at E:/perl/site/lib/Net/SSH/Perl/Kex.pm line 6 Net::SSH::Perl::SSH2::BEGI +N at E:/perl/site/lib/Net/SSH/Perl/SSH2.pm line 6
Edited by planetscape - added code tags around program output
2006-07-11 Retitled by planetscape, as per Monastery guidelines
Original title: 'SSH not wroking with TK'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SSH not working with TK
by zentara (Cardinal) on Jul 10, 2006 at 17:02 UTC | |
by veeruch (Sexton) on Jul 11, 2006 at 05:03 UTC | |
by veeruch (Sexton) on Jul 11, 2006 at 06:03 UTC | |
by veeruch (Sexton) on Jul 11, 2006 at 10:07 UTC |