UJP - Red Hat 7.6 install on VirtualBox 6.0 その5 rootユーザでsshログインできるように設定する

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

ブログ - Red Hat 7.6 install on VirtualBox 6.0 その5 rootユーザでsshログインできるように設定する

Red Hat 7.6 install on VirtualBox 6.0 その5 rootユーザでsshログインできるように設定する

カテゴリ : 
ハウツー
ブロガー : 
ujpblog 2019/1/20 3:12
 セキュリティ上は好ましくないので,作業が全て終わったら設定を戻す必要がある.

 sshd_configの中のPermitRootの設定を確認.
[root@localhost ~]# cat /etc/ssh/sshd_config|grep PermitRoot🆑
#PermitRootLogin yes🈁
# the setting of "PermitRootLogin without-password".
[root@localhost ~]#
 デフォルトではコメントアウトしてあるので,先頭の#をとる.記載がない場合は,次のようになる様に記述を追加する.

[root@localhost ~]# cat /etc/ssh/sshd_config|grep PermitRoot🆑
PermitRootLogin yes🈁
# the setting of "PermitRootLogin without-password".
[root@localhost ~]#
 設定を変更したので,SSHDを再起動する.
[root@localhost ~]# service sshd restart🆑
Redirecting to /bin/systemctl restart sshd.service
[root@localhost ~]#
 sshで接続してみる.
$ ssh root@192.168.20.51🆑
The authenticity of host '192.168.20.51 (192.168.20.51)' can't be established.
ECDSA key fingerprint is SHA256:HNSQDVQ7N7pX9XffBVvCD4iIwBFrXVkBW1Hvrlu4OX4.
Are you sure you want to continue connecting (yes/no)? yes🆑
Warning: Permanently added '192.168.20.51' (ECDSA) to the list of known hosts.
root@192.168.20.51's password:
Last login: Sun Jan 20 02:55:40 2019
[root@localhost ~]#
 つながりました.

トラックバック


広告スペース
Google