1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Parallel SSH(pssh)の名前が紛らわしすぎる問題

Posted at

はじめに

HPCやGPUクラスタのメンテナンスをしようとした場合に便利なコマンドとしてpsshがありますが、しかしこの pssh という名前、同名の別物が複数存在しており非常に紛らわしいです。自分も何回も混乱したのでまとめておきます。

項番 用途 入れるもの コマンド名 備考
1 複数ノードへ並列 ssh 実行(クラスタ運用・管理) OSパッケージ版 Parallel-SSH pssh / parallel-ssh HPC管理で普通に使いたいのはこっちのほう!
2 Pythonコード内から並列SSH制御 Pythonライブラリ pssh from pssh.clients import ParallelSSHClient CLIの pssh とは完全に別物

1. OSパッケージ版 Parallel-SSH

本来はこれを使いたいことがほとんど。インストール方法は

  • Ubuntu
frowning2
$ sudo apt update
$ sudo apt install parallel-ssh

重要な注意点(ここが一番ややこしい)
ディストリビューションによってパッケージ名がparallel-sshの場合とopenssh-psshの場合があることがある!

$ sudo apt install openssh-pssh
  • 注意点
    コマンド名は基本的にpsshなのだが、parallel-sshであることがある。これがものすごくいやらしい!

2. Pythonライブラリ版 pssh

pythonのライブラリでOSパッケージのParallel-SSH的な動作を実現するためのライブラリ。こちらも便利なのでつかってもいいけどコマンド版のpsshとは別物!

$ pip install pssh
  • 利用方法
from pssh.clients import ParallelSSHClient
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?