Questions tagged [perlnetssh]

19 questions
3
votes
2 answers

Sometimes long running ssh commands stop printing to stdout

I have been using Perl::Net::SSH to automate running some scripts on my remote boxes. However, some of these scripts take a really long time to complete (hour or two) and sometimes, I stop getting data from them, without actually losing the…
Malfist
  • 31,179
  • 61
  • 182
  • 269
2
votes
1 answer

Perl Net::SSH2 How to Change the Host Key Algorithms/Typ?

We have a working Perl Program that connects to a Server of a Costumer via Net::SSH2 with an ssh-rsa public and private key pair and automatically downloads some Files that are then proceeded by our System. Now the customer communicated that they…
2
votes
2 answers

.exe crated using Par::Packer with script containing Net::SSH2 is not working

Am using Net::SSH2 module in my Perl script and trying to make an executable (.exe for windows) using Par::Packer. The script need to ssh to a linux box from a windows box using public keys and don't want to input password. Am facing the below error…
Senthil A Kumar
  • 10,306
  • 15
  • 44
  • 55
2
votes
0 answers

Perl NET::SSH2 let channel active

I need to execute shell script on remote host and wait for it but pipe is broken after 30 minutes. I'm using NET::SSH2. How can I let the ssh channel active? I tried: $ssh2->keepalive_config( 1, 2000); pipe broken, after 30minutes…
red-eno
  • 23
  • 4
2
votes
0 answers

How could be deprecated Net::SSH->poll avoided

Net::SSH2->poll doc: Deprecated: the poll functionality in libssh2 is deprecated and its usage disregarded. Session methods "sock" and "block_directions" can be used instead to integrate Net::SSH2 inside an external event loop. Can someone provide…
palik
  • 2,425
  • 23
  • 31
2
votes
0 answers

Looking for Net::SSH2 authentication with interactive screen. Perl

I am trying to access shell of a remote unix node. I need to go through its login process. Step 1 : The login screen requires me to type 'start' after which below screen appears Step 2: To get the password prompt, I need to press 'down arrow key'…
Kiran Chaudhary
  • 124
  • 1
  • 2
  • 7
2
votes
0 answers

Perl: Net::SSH::Perl, authentication with password AND pubkey

I am using Net::SSH::Perl and it works well with password or publiey-key authentication. But if i try to use both it struggles. But if I try it with OpenSSH clients ssh or sftp it is working well. Heres code and log. my $ssh =…
chris01
  • 10,921
  • 9
  • 54
  • 93
1
vote
2 answers

Net::SFTP::Foreign - rput fails (sort of) if target dir exists

http://metacpan.org/pod/Net::SFTP::Foreign my ( $user, $password, $host ) = @_; my ( $source, $dest ) = '/whatever'; my $sftp = Net::SFTP::Foreign->new( user => $user, host => $host, password => $password, more => [ -o =>…
Norma Stitz
  • 89
  • 10
1
vote
3 answers

Export PATH using NET::SSH:PERL

I am writing a shell script to automate some of the tedious tasks that we perform. I need to ssh to a server and change the PATH variable remotely, have that variable persist for the next commands to be executed. Code below; sub ab_tier{ my…
f-z-N
  • 1,645
  • 4
  • 24
  • 38
1
vote
0 answers

Perl - SSHProcessError The ssh process was terminated error

I have built a script which will do ssh to the remote server and execute certain command. To make execution successful I was waiting until I get END keyword from the command result. So in positive test case scenario this works fine. ... foreach my…
vkk05
  • 3,137
  • 11
  • 25
1
vote
1 answer

Not able to execute command in remote machine Using Net::SSH::Expect

I wanted to make the remote connection and automate the change password of any user account in that remote machine so I am using Perl Net::SSH:: Expect module. My connection is happening but I'm not able to perform any command on the remote machine.…
luffy008
  • 37
  • 7
1
vote
1 answer

Net::SSH::Perl throws error No kex algorithm at /usr/share/perl5/vendor_perl/Net/SSH/Perl/SSH2.pm line 92

I am using Net::SSH::Perl to connect to a Qlogic switch. when it fails with the below error: No kex algorithm at /usr/share/perl5/vendor_perl/Net/SSH/Perl/SSH2.pm line 92 Code: use Net::SSH::Perl; $ssh = Net::SSH::Perl->new("$switch_name",…
Gary Vernon Grubb
  • 9,695
  • 1
  • 24
  • 27
1
vote
1 answer

NET-SSH2 for perl 5.20.2 on windows 2008 r2

I am trying to install NET-SSH2 for perl 5.20.2 on windows 2008r2 but no success. C:\Perl>ppm install NET-SSH2 Downloading ActiveState Package Repository packlist...failed 500 Can't connect to ppm4.activestate.com:80 ppm install failed: Can't…
1
vote
1 answer

Is there an equivalent in Net::SSH::Expect 1.09 for "collect_exit_code"

I came across this link: Exit status code for Expect script called from Bash but it did not help me. As I was looking to get the exit status code from a command run remotely, I came across cpan documentation for Net::SSH::Expect 0.08 which has…
harperville
  • 6,921
  • 8
  • 28
  • 36
0
votes
1 answer

Stop NET::SSH2 from printing unwanted data

I am trying to use NET::SSH to execute a command in a remote Ubuntu system from perl.I got the desired output but along with it the script is printing lots of unwanted data.How can we stop it. Thanks in advance. Here is the sample unwanted data…
Vsreddy
  • 71
  • 1
  • 9
1
2