ssh-keygen
安全SSH鍵の生成
ssh-keygen -t ed25519
公開鍵認証用の鍵ペアを生成。現在はed25519推奨。公開鍵(.pub)を相手の authorized_keys に登録して使う。
実行例
ssh-keygen -t ed25519 -C '[email protected]'推奨方式で鍵作成ssh-copy-id user@host公開鍵をリモートへ登録
書式
ssh-keygen [-t type] [-f file] [-C comment]
実行前の注意
秘密鍵は厳重管理。上書きに注意。