FreeBSD 【FreeBSD サーバー構築入門 第8回】SSH の公開鍵認証 ― ssh-keygen、ssh-copy-id、sshd_config の3つの設定、KbdInteractiveAuthentication、sshd -t、パスワードログインの停止
FreeBSD 15.1 の SSH を、パスワードから公開鍵認証へ切り替える手順を解説します。ssh-keygen で鍵を作り、ssh-copy-id で公開鍵を置き、sshd_config の PermitRootLogin・PasswordAuthentication・KbdInteractiveAuthentication を変えて、sshd -t で確かめてから読み直し、別の画面で確かめるまで。Windows の手順と、締め出されないための順番も載せます。