I've been trying to find a simple way to use SSH in perl, and I could not find something that 'just. The dependency on local OpenSSH being installed is. From: Rajeev Prasad To: perl list perl.org Sent: Friday, January 20, 2012 1:10 PM Subject: Net::Openssh and sudo? Hello, using Net::Openssh how can i use sudo to become some other user (say root) on a target machine and then execute a series of commands as root?
Net::OpenSSH does not work on Windows, not even when using the Cygwin perl!Net::OpenSSH uses a feature available in recent OpenSSH ssh clients that allows to establish the SSH connection to the remote host from one process and then, reuse it from other processes.
Unfortunately, that feature does not work under Windows because these OSs lack support for passing open file handles between processes through local sockets that's the way OpenSSH internally connects SSH channels to the I/O streams of the slave processes.
Perl Net::openssh
AFAIK, nobody has found a way to overcome this limitation yet.
Perl Openssh
Try Net::SSH2, Net::SSH::Perl, Net::SSH::Expect (that works under Cygwin but not under other perls for Windows) or Net::SSH.