弹性云服务器 ECS-远程连接Linux云服务器报错:Permission denied:处理方法
时间:2025-02-12 15:15:30
处理方法
- 进入云服务器的单用户模式。
以CentOS 7操作系统为例:
- 执行以下命令,查询内核的fs.nr_open值。
- 编辑 /etc/security/limits.conf,修改配置的nofile值为合理的值,需小于2中查询的fs.nr_open值,例如65535。
vi /etc/security/limits.conf
limits.conf 文件实际是Linux PAM(插入式认证模块,Pluggable Authentication Modules)中pam_limits.so 的配置文件。更多详细配置信息请查看man手册,执行:
man limits.conf
- 重启服务器,重试连接云服务器。
support.huaweicloud.com/trouble-ecs/ecs_trouble_0528.html