How to SSH from Perl script from Windows machine to EC2 machine
I want to establish an ssh tunnel between my windows machine and EC2 machine, I want to use perl for that, according to this documentation , I need to use. /driver.pl script which I could not find.
I am using this line to ssh to my machine using the command line.
ssh -2 -p 22 username@id-address -i keyfile.ssh -L p8600/Localhost/3306
I tried it from this post , but I am getting this error:
my $ssh_pid= open("ssh -2 -p 22 username@id-address -i keyfile.ssh -L p8600/Localhost/3306 |") or die;
Can't use string ("ssh -2 -p 22 username@id-address"...) as a symbol ref while "
strict refs" in use at .\start.pl line 39.
D:\DESKTOP\JEFF_SHIH\MAPPING_FILE_GENERATOR>
how can I translate the above line into perl or fix the above line to get the error. I have installed Net :: SSH :: Tunnel
Thank!
source to share
Use Net::SSH::Perl
to avoid complicated (on Windows!) Dependencies with ssh binaries. This module is written entirely in Perl, so it should work on any platform. Net :: SSH :: Perl
source to share