AWS EC2 Ubuntu 24.04实例SSH密码登录提示Permission Denied问题求助
AWS EC2 Ubuntu 24.04实例SSH密码登录提示Permission Denied问题求助
我最近在AWS EC2实例上部署了Ubuntu 24.04服务器,想要修改配置改成密码认证登录,但每次尝试登录都会收到Permission denied, please try again.的错误提示。
我已经做了以下操作:
- 修改
/etc/ssh/sshd_config配置文件,设置PubkeyAuthentication no以及PasswordAuthentication yes - 创建了一个拥有sudo权限的新用户
- 执行
sudo systemctl restart ssh命令重启了SSH服务 - 检查过这个用户没有被锁定
- 确认配置文件中没有设置
AllowUsers项 - 反复核对过密码是正确的(我可以通过
su命令切换到该用户,完全没问题)
以下是尝试连接时的调试输出:
ssh -vvv username@18.xxx.xxx.xxx OpenSSH_9.6p1, LibreSSL 3.3.6 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files debug1: /etc/ssh/ssh_config line 54: Applying options for * debug2: res...
备注:内容来源于stack exchange,提问作者KKBSE2016
相关产品推荐
相关产品推荐

