use 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--compilation aborted at E:/perl/site/lib/Crypt/Random/Generator.pm line 12, line 1. Compilation failed in require at E:/perl/site/lib/Crypt/Random.pm line 18, line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Crypt/Random.pm line 18, line 1. Compilation failed in require at E:/perl/site/lib/Crypt/DH.pm line 6, line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Crypt/DH.pm line 6, line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl/Kex/DH1.pm line 13, line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/Perl/Kex/DH1.pm line 13, line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl/Kex.pm line 6, line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/Perl/Kex.pm line 6, line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl/SSH2.pm line 6, line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/Perl/SSH2.pm line 6, line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/W32Perl/SSH2.pm line 7, line 1. BEGIN failed--compilation aborted at E:/perl/site/lib/Net/SSH/W32Perl/SSH2.pm line 7, line 1. Compilation failed in require at E:/perl/site/lib/Net/SSH/Perl.pm line 55, 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::BEGIN at E:/perl/site/lib/Net/SSH/Perl/SSH2.pm line 6