如题,az的ubuntu修改了/etc/ssh/sshd_config后配置PasswordAuthentication no,保存文件后systemctl restart sshd 和重启都没生效,还是能口令登录
@docker #1 他说的是不让密码登录吧。
你是不是没删除#
仔细找找配置文件,引用了其他目录的文件,里面允许了密码登录
@superen #2 删了
把sshd_config发出来看看
机器创建的问题
vim /etc/ssh/sshd_config.d/50-cloud-init.conf
#修改为
PasswordAuthentication no
PubkeyAuthentication yes
#保存退出 然后重启SSH
systemctl restart ssh
@ttp #8 就是这样的,还是不行
@kissyouhunter #7 好像是我创建机器的时候用口令创建的问题,不过奇怪了Debian11倒是正常的
@docker #1 他说的是不让密码登录吧。
你是不是没删除#
仔细找找配置文件,引用了其他目录的文件,里面允许了密码登录
@superen #2 删了
把sshd_config发出来看看
机器创建的问题
vim /etc/ssh/sshd_config.d/50-cloud-init.conf
#修改为
PasswordAuthentication no
PubkeyAuthentication yes
#保存退出 然后重启SSH
systemctl restart ssh
@ttp #8 就是这样的,还是不行
@kissyouhunter #7 好像是我创建机器的时候用口令创建的问题,不过奇怪了Debian11倒是正常的