sshd パスワードログイン禁止 | クズリーマンのカス備忘録

sshd パスワードログイン禁止

tux logo Linux
スポンサーリンク

 

@IT:sshでパスワード認証を禁止するには

vim /etc/ssh/sshd_config

 

#PasswordAuthentication yes

       ↓

PasswordAuthentication no

 

 

上記やればおkよ~。

 

念のため、以下もやりなさいよ~、と。

 

#RSAAuthentication yes

       ↓

RSAAuthentication yes ←RSA認証を許可(ssh1のみ)

 

ん^^?、、、ssh1とは?

 

sshd_config に RSAAuthentication no を設定する必要はもうない - Qiita
新しいサーバを立ち上げていつも通りに公開鍵認証を使うように設定していたら、sshdからエラーが出たので調べてみた。/etc/ssh/sshd_config line **: Deprecated …

廃止されとるな。

 

vimで検索した画面

sshd_configにも、「RSAAuthentication」ないわー。

 

 

 

PubkeyAuthentication yes ←公開鍵認証を許可(ssh2のみ)

 

じゃがこれ、デフォルトでyesやな。(qiita

ま一応明示的にやってあげるかー。

 

 

 

 

#RhostsAuthentication no
       ↓
RhostsAuthentication no ←rhost認証を禁止

こやつもSSH1向けのものらしく、廃止されとるな。

 

 

設定が済んだらサービス再起動。

まず設定ファイルの構文テスト。

sshd -t

なんにも表示されないこと。

 

 

再起動実施。

systemctl restart sshd.service

コメント

タイトルとURLをコピーしました