概要

管理ノードと計算ノードの間の通信はSSHで行います。

手順

  1. 管理ノードのジョブを投げるユーザーのアカウント(以下ではsugimotoとします)にログインし、SSH鍵を作成します。すべての質問になにも入力せずにエンターを押し続けます
    $ ssh-keygen
    Generating public/private ed25519 key pair.
    Enter file in which to save the key (/home/sugimoto/.ssh/id_ed25519): 
    Enter passphrase for "/home/sugimoto/.ssh/id_ed25519" (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /home/sugimoto/.ssh/id_ed25519
    Your public key has been saved in /home/sugimoto/.ssh/id_ed25519.pub
    The key fingerprint is:
    SHA256:dPdYgf+eSWElVrEo2fIP3HiUqL9vitrYi30JTaEGfVw sugimoto@head
    The key's randomart image is:
    +--[ED25519 256]--+
    |          . ..oEo|
    |         . .++=.+|
    |        . o++*o=.|
    |       . . +*==o |
    |        S ..+=o+.|
    |           ...+..|
    |            ..ooo|
    |          * .o.+.|
    |         +.*oo+. |
    +----[SHA256]-----+
  2. 公開鍵を設置します
    $ cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
    • NFSサーバを設置しているので、管理ノードにおいてある鍵は計算ノードでも見えます
  3. 初回接続時に表示されるメッセージを抑制させます
    $ echo "StrictHostKeyChecking no" >> ~/.ssh/config
  4. 権限を変更します
    $ chmod 600 ~/.ssh/id_ed25519
    $ chmod 600 ~/.ssh/authorized_keys
    $ chmod 700 ~/.ssh/
  5. 実際にパスワード無しで計算ノードにログインできるか確かめます
    $ ssh node11