如何在AWS EC2 Ubuntu实例上使用密码身份验证启用根登录



i编辑了sshd_config文件

PermitRootLogin yes
PasswordAuthentication yes

之后,我创建了一个新用户

adduser John

授予根特权

usermod -aG sudo John

之后,我使用SFTP客户端连接并尝试传输文件。但是,服务器发送了错误消息"拒绝权限"

我在修改后重新启动了服务器。

确保pubKeyAuthentication no in/etc/ssh/ssh/sshd_config文件

相关内容

最新更新