您的位置:首页 > 运维架构 > Shell

使用xshell无法连接远程centos服务器

2017-02-06 13:19 537 查看
原来一直是可以登录的,自从放假回来,再用xshell就登录不上了。网上搜了一大堆答案,好像都不行。
现象:1:日志内容(是我用root登录后查看的)Feb 6 11:07:19 hostA sshd[32309]: Accepted password for tomcat from 115.197.x.x port 27073 ssh2Feb 6 11:07:19 hostA sshd[32309]: pam_unix(sshd:session): session opened for user tomcat by (uid=0)Feb 6 11:07:19 hostA sshd[32311]: fatal: setresuid 500: Resource temporarily unavailableFeb 6 11:07:19 hostA sshd[32309]: pam_unix(sshd:session): session closed for user tomcat
2:xshell显示内容
Connecting to 114.215.x.x:22...Connection established.To escape to local shell, press Ctrl+Alt+].
Connection closed by foreign host.
Disconnected from remote host(testA) at 11:07:25.
Type `help' to learn how to use Xshell prompt.
3:使用root切换tomcat,报如下错误[root@hostA ~]# su tomcat
su: cannot set user id: Resource temporarily unavailable

===============================================================解决办法:1:vim /etc/security/limits.d/90-nproc.conf* soft nproc 65535 <---此数值该大点2:sysctl -p

另外:
nproc表示为用户进程数。
查看文件打开数:lsof |grep tomcat|wc -l

查看用户进程数:ps -U tomcat |wc -l

参考内容戳这里 <--
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  连接 远程 xshell