弹性云服务器 ECS-怎样禁用SSH密码方式连接云服务器?:操作步骤
时间:2025-02-12 15:15:30
操作步骤
- 登录Linux云服务器,执行以下命令编辑云服务器SSH连接方式。
vi /etc/ssh/sshd_config
修改如下配置项:
把PasswordAuthentication yes改为PasswordAuthentication no
- 重启sshd使修改生效。
- 重启云服务器。
- 通过SSH密码方式连接云服务器。
具体操作步骤,请参见SSH密码方式登录。
如果提示连接失败,说明已成功禁用SSH密码访问方式。
support.huaweicloud.com/trouble-ecs/ecs_trouble_0361.html