如何从Perl脚本SSH从Windows计算机EC2机 [英] How to SSH from Perl script from windows machine to EC2 machine
问题描述
我要设置和我的Windows机器和EC2计算机之间的SSH隧道,我想用perl的,根据这个的文档,我必须用我找不到./driver.pl脚本。
I want to set and ssh tunnel between my windows machine and EC2 machine, I want to use perl for that, according to this documentation, I have to use ./driver.pl script which I couldn't find.
我用这个字符串中使用命令行ssh到我的机器。
I use this string to ssh to my machine using command line.
SSH -2 -p 22名@ ID地址-i keyfile.ssh -L P8600 /本地主机/ 3306
我想这从这个帖子但我得到这个错误:
I tried this from this post but I get this error:
我的$ ssh_pid =打开(SSH -2 -p 22名@ ID地址-i keyfile.ssh -L P8600 /本地主机/ 3306 |)或死亡;
不能使用字符串(SSH -2 -p 22名@ ID地址...)为标志,同时参考
在使用中严格的裁判。\ start.pl线39。
D:\桌面\ JEFF_SHIH \ MAPPING_FILE_GENERATOR>
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>
我怎么能翻译上面的字符串到perl或修复上面的字符串来获得乘坐的错误。 我安装的Net :: SSH ::隧道
how can I translate the above string to perl or fix the string above to get ride of the error. I installed Net::SSH::Tunnel
谢谢!
推荐答案
使用的Net :: SSH :: Perl的
来避免棘手的(在Windows!)依赖于SSH-二进制文件。该模块是完全用Perl编写的,所以它应该在任何平台上。 的Net :: SSH :: Perl的
Use Net::SSH::Perl
to avoid tricky (on Windows!) dependencies to ssh-binaries. This module is written completely in Perl, so it should work on any platform. Net::SSH::Perl
这篇关于如何从Perl脚本SSH从Windows计算机EC2机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!