SSH 接続
公開鍵を他サーバにアップして wget でダウンロードしたかったので、wget を使えるよう先に↓ 。
~]# dnf -y group install Base
authorized_keys をセット。
~]# cd .ssh .ssh]# wget https://example.com/authorized_keys .ssh]# chmod 600 authorized_keys
SSH 接続。
local:~$ ssh root@IPアドレス
SSH 設定確認
主な項目を確認。
~]# sshd -T | grep -i -E 'SyslogFacility|PermitRootLogin|PermitEmptyPasswords|PasswordAuthentication'
permitrootlogin without-password passwordauthentication yes permitemptypasswords no syslogfacility AUTHPRIV
「PasswordAuthentication no」に変更しています。
~]# vi /etc/ssh/sshd_config
を編集して、sshd 再起動。
~]# systemctl restart sshd
もう一度確認。
permitrootlogin without-password passwordauthentication no permitemptypasswords no syslogfacility AUTHPRIV