ProgrammerAH

Programmer Guide, Tips and Tutorial

Skip to content

[Solved] Linux SSH Login Terminal Error: shell request failed on channel 0

The following problems occurred when logging on the server today:

Phenomenon
1. Remote CRT login

[root@fast70 ~]# vim /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     65535
root       soft    nproc     unlimited

2. You can log in from other accounts. There is no problem to view the process and load on top
switch to root, and then switch to the fast account
[ root@fast70 ~]# su – fast
last login: May 12 00:32:45 CST 2020 from 192.168.0.9pts/2
Su: warning: cannot change to/home/fast Directory: there is no file or directory
Su: failed to execute/bin/bash: the resource is temporarily unavailable

Solution:
enter the root user
Modify /etc/security/limits.d/20-nproc.conf
expand the maximum value of * user connection (4096 -> 65535)

[root@fast70 ~]# vim /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     65535
root       soft    nproc     unlimited

After modification, remote login and account switching can be used normally
however, I always feel that the root cause has not been found. It must be related to resource occupation, but I can’t find the specific location
I have contacted watchdog to kill the process several times before. I doubt that it is still a symptom rather than a root cause

This entry was posted in Linux and tagged linux, Linux SSH Login Terminal Error, O & M and server, ssh, The server on 2022-08-29 by Robins.

Post navigation

← [Solved] Vue2 Cross-domain Error: AxiosError net::ERR_FAILED, Network Error, ERR_NETWORK [Solved] Mybatis Error: Resources.getResourceAsStream(resource) cannot find the method →

Recent Posts

  • MAFIA: 1- OpenFlow statistics (Counters, Timestamps)(mafia-sdn/p4demos/demos/1-openflow/1.1-statistics/p4src/of.p4)
  • LDSC: Could not open Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscore[./gz/bz2]
  • Gradle Package Project Lombok Not Working: No serializer found for class com.qbb.User and no properties discovered to create BeanSerializer……
  • [Solved] PCH Warning: header stop not at file scope
  • pymysql Error: File “/usr/local/lib/python2.7/site-packages/PyMySQL-1.0.2-py2.7.egg/pymysql/connections.py”, line 167 SyntaxError: invalid syntax
Proudly powered by WordPress