为什么pssh命令不起作用?


20

我在Ubuntu 11.10 x64系统中安装了pssh软件包。我可以通过调用parallel-ssh运行该程序,但是pssh给了我

$ pssh
No command 'pssh' found, did you mean:
 Command 'bssh' from package 'avahi-ui-utils' (universe)
 Command 'cssh' from package 'clusterssh' (universe)
 Command 'ssh' from package 'openssh-client' (main)
 Command 'posh' from package 'posh' (universe)
 Command 'pdsh' from package 'pdsh' (universe)
 Command 'mssh' from package 'mssh' (universe)
 Command 'zssh' from package 'zssh' (universe)
 Command 'rssh' from package 'rssh' (universe)
 Command 'ppsh' from package 'ppsh' (universe)
 Command 'push' from package 'heimdal-clients' (universe)
pssh: command not found

为什么会发生这种情况?使pssh命令正常工作的正确方法是什么?

PS我知道我可以创建链接到/ usr / bin / parallel-ssh的名为/ usr / bin / pssh的链接,但是这些对我来说似乎很肮脏。:(


pssh不在您的可执行路径中。对我来说,这听起来像是个肮脏的骇客。如果您不喜欢它,可以将其移至PATH。或者,您可以将其放在/ home / $ USER / bin中并从那里执行。
j0h

我的解决方案:echo "alias pssh=parallel-ssh" >> ~/.bashrc && . ~/.bashrc
bmaupin

Answers:


31

关于原因,请参见/usr/share/doc/pssh/README.Debian。

To avoid any conflicts with the putty package, all of the programs have been
renamed.

parallel-ssh is pssh
parallel-scp is pscp
parallel-rsync is prsync
parallel-nuke is pnuke
parallel-slurp is pslurp

关于该符号链接,一个稍微干净的解决方案是创建/ usr / local / bin / pssh符号链接,并使其指向/ usr / bin / parallel-ssh。除了/ usr / local /以外,通常最好将/ usr /的内容留给软件包管理器。默认情况下,/ usr / local / bin也是PATH环境的一部分。


11

尝试使用parallel-ssh它已重命名。

引用包装说明:

 The package contains:
 .
  - Parallel ssh (parallel-ssh, upstream calls it pssh), executes commands on
    multiple hosts in parallel
  - Parallel scp (parallel-scp, upstream calls it pscp), copies files to
    multiple remote hosts in parallel
  - Parallel rsync (parallel-rsync, upstream calls it prsync), efficiently
    copies files to multiple hosts in parallel
  - Parallel nuke (parallel-nuke, upstream calls it pnuke), kills processes on
    multiple remote hosts in parallel
  - Parallel slurp (parallel-slurp, upstream calls it pslurp), copies files
    from multiple remote hosts to a central host in parallel
 .
 These tools are good for controlling large collections of nodes, where faster
 alternatives such as gexec and pcp are not available.

1

有时,用于启动程序的命令名称与为获取该程序而安装的软件包的名称不同。

我最近在安装“迷宫游戏”迷宫游戏时发现了这个问题,但它没有出现在“游戏”菜单中,花了我几分钟的时间才知道要开始游戏,我必须去终端并输入“猫'。/轶事。

发生这种情况的原因可能多种多样,例如名称(如我的轶事)太长,无法成为命令的合理名称,也许开发人员想要的名称已经被选择,开发人员脑中只有虫子而只想称它为完全随机的东西使您陷入混乱-为什么不值得担心,如果要“修复”它,只需使用别名或符号/硬链接。

如果您感到不便,则可以向上游提交更改请求,但是如果开发人员选择了该名称,则可能有充分的理由。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.