LoginSignup
0
0

More than 3 years have passed since last update.

rootユーザーのssh接続禁止設定

Posted at

手順

1. /etc/ssh/sshd_configを開く。

次のコマンドを実行する。
vi /etc/ssh/sshd_config

2. rootユーザーssh接続を禁止に設定する。

/etc/ssh/sshd_configの次の部分の"yes"を"no"に変更する。
PermitRootLogin yes → PermitRootLogin no

3. sshdを再起動し、設定を反映する。

次のコマンドを実行する。
service sshd restart

まとめ

sshd_configを編集してrootユーザーのログインを禁止にし、sshdを再起動して、設定を反映する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0