- クライアント側で以下の鍵を発行する操作をする
ssh-keygen -t ed25519
Generating public/private ed25519 key pair. Enter file in which to save the key (/root/.ssh/id_ed25519): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_ed25519. Your public key has been saved in /root/.ssh/id_ed25519.pub. The key fingerprint is: SHA256:lfXUOABCdeFGHIJKPibkPe8lsXgXDX2WjcdFJy1234BY9FE root@rhel8.4-test The key's randomart image is: +--[ED25519 256]--+ |o ..+ . .o | |+. . X Eo.oo .| |.+ o . = Xoo ... | |o = + + =.+ | | o X = .S= | | o = + + . | | * . o | | = . . | | . | +----[SHA256]-----+
cd /root/.ssh cat id_ed25519.pub
~中身の例~
ssh-ed25519 AAABD3NxfC1lZDI1ABCDEXXXXIIHJ6nanvGGpMnDEXwpDd9YgxYu7ikiQGgB/Zn99HFOs root@rhel8.4-test
- ホストに登録
cd /root/.ssh
- id_ed25519.pub viで 上記で生成したの
~中身の例~
を追記する
この設定で以降のsshでパスワードを聞かれなくなる