gpt4 book ai didi

Perl's Net::(SSH vs SSH2 vs OpenSSH)——我应该如何比较它们?

转载 作者:行者123 更新时间:2023-12-04 01:57:49 31 4
gpt4 key购买 nike

希望通过 Perl 脚本在远程机器上执行 perl 脚本。似乎一种选择是使用 system()功能并创建一个 ssh key ,因此不需要密码。这导致我关注这个问题,另一个选项似乎是安装和运行这些 perl 模块之一:

  • Net::SSH
  • Net::SSH2
  • Net::OpenSSH

  • 除了使用的协议(protocol)之外,我还应该与这些 Perl 模块进行比较吗?

    最佳答案

    Net::OpenSSH文档有 section描述各自的优缺点。以下是与您所询问的内容相关的一些摘录,但文档列出了更多内容:

    Net::SSH is just a wrapper around any SSH binary commands available on the machine. It can be very slow as they establish a new SSH connection for every operation performed.

    Net::SSH2 is much better than Net::SSH::Perl, but not completely stable yet. It can be very difficult to install on some specific operative systems and its API is also limited, in the same way as Net::SSH::Perl.

    Net::OpenSSH has a very perlish interface. Most operations are performed in a fashion very similar to that of the Perl builtins and common modules (i.e. IPC::Open2).



    但是,平台的选择可能会限制您的选择。

    On the other hand, Net::OpenSSH does not work on Windows, not even under Cygwin.



    当然,该列表偏向于 Net::OpenSSH ,但它让您了解模块之间的主要区别。

    关于Perl's Net::(SSH vs SSH2 vs OpenSSH)——我应该如何比较它们?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5031334/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com