问题:appuser用户SSH远程连接Linux服务器出现的问题:
Connecting?to?localhost:22...
Connection?established.
To?escape?to?local?shell,?press?'Ctrl+Alt+]'.
Connection?closed?by?foreign?host.
Disconnected?from?remote?host(localhost)?at?10:07:59.
Type?`help'?to?learn?how?to?use?Xshell?prompt.
登录后台root用切换普通用户报错:
[root@test ~]# su - appuser
su: 无法设置用户ID: 资源暂时不可用
解决:修改用户最大线程数
[root@test ~]# vim /etc/security/limits.d/90-nproc.conf
* soft nproc 1024
root soft nproc unlimited
改为
[root@test ~]# vim /etc/security/limits.d/90-nproc.conf
* soft nproc 10240 //将这个数值由1024改到10240.或者直接删除这一行
root soft nproc unlimited
重新使用ssh远程即可登陆。