Answer the question
In order to leave comments, you need to log in
How to create an SSH connection in perl under Windows?
I've been struggling with perl SSH connection under Windows for a couple of days. Tried Net::W32Perl, Net::SSH2, SFTP, even tried SSH::Any , but in most cases the script complains about getpwuid, which is not implemented by Windows.
Now the script is like this
#!/usr/bin/perl
use warnings;
use strict;
use Net::SSH2;
my $host = '255.255.255.255';
my ($user) = 'admin';
my ($pass) = 'admin';
my $ssh = Net::SSH2->new($host, user => $user, password => $pass);
$ssh -> connect ($host);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question