ssh 连接报错 packet_write_wait

# ssh [email protected]
[email protected]'s password: 
packet_write_wait: Connection to 10.1.10.153 port 22: Broken pipe
or
error: ssh: unexpected packet in response to channel open: 

检查发现只有nemo用户登录不上,其他用户登录正常
查看/var/log/auth.log

# tail -f /var/log/auth.log
报错:
sshd[271061]: fatal: fork of unprivileged child failed
解决:
# systemctl -t slice 
UNIT                         LOAD   ACTIVE SUB    DESCRIPTION
-.slice                      loaded active active Root Slice
system-getty.slice           loaded active active system-getty.slice
system-systemd\x2dfsck.slice loaded active active system-systemd\x2dfsck.slice
system.slice                 loaded active active System Slice
user-0.slice                 loaded active active User Slice of root
user-1004.slice              loaded active active User Slice of jumpserver
user-1011.slice              loaded active active User Slice of nemo
user.slice                   loaded active active User and Session Slice

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

8 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

通过以上信息查找到nemo用户的slice文件为user-1011.slice

# cat /sys/fs/cgroup/pids/user.slice/user-1011.slice/pids.max
12288
# echo 65535 > /sys/fs/cgroup/pids/user.slice/user-1011.slice/pids.max

重新登录正常

你可能感兴趣的:(ssh 连接报错 packet_write_wait)