見出し画像

Conoha VPS の一番安いやつで追加したユーザーをパスワードでログインできないようにする。

前回のつづきです。

OS は OpenSUSE です。

本家を参考に。

ユーザーでログインします。

ssh appl-user@xxx.xxx.xxx.xxx

root ユーザーにスイッチします。

su - root

以下のファイルを開きます。

/etc/ssh/sshd_config

ファイル中の以下のラインをコメントアウトし、yes を no に変えます。

# PasswordAuthentication yes

PasswordAuthentication no

ファイル中の以下のラインの yes を no に変える。

PasswordAuthentication yes
              ↓
PasswordAuthentication no

/etc/ssh/sshd_config を保存し閉じます。

/etc/ssh/sshd_config で設定した内容を反映します。

systemctl reload sshd

おしまい


この記事が気に入ったらサポートをしてみませんか?