我想禁用 ssh 伺服器的基於公私鑰的身份驗證。只想使用基於密碼的 ssh 用戶端登入。如何配置呢?有什麼幫助嗎?
我的 /etc/ssh/sshd_config 檔案的內容如下 Include /etc/ssh/sshd_config.d/*.conf
AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
# For this to work you will also need host keys in
/etc/ssh/ssh_known_hosts
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
我的 /etc/ssh/ssd_config 檔案的內容如下
Include /etc/ssh/ssh_config.d/*.conf
Host *
PasswordAuthentication yes
HostbasedAuthentication no
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null