Ubuntu 升级到 18.04 setrlimit、getrlimit 和 ssh_sandbox_child 导致 sshd 无法工作

Ubuntu 升级到 18.04 setrlimit、getrlimit 和 ssh_sandbox_child 导致 sshd 无法工作

我正在do-release-upgrade虚拟机上从 Ubuntu 16.04 全新安装至 18.04。

升级后,我无法再通过端口 22 访问。再次尝试,我在执行升级之前安装了 drop bear,并将其设置为端口 2222,这样就成功了。

现在尝试使 sshd 重新上线,sudo /usr/sbin/sshd -D -d尝试连接时出现以下信息:

root@server:/etc/ssh# sudo /usr/sbin/sshd -D -d
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: setrlimit: Function not implemented
debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n  7 Dec 2017
debug1: private host key #0: ssh-rsa SHA256:tcrXf+XQwDjGFkl7trXSgNjzu1ldhoYUHrejxPnHFdg
debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:LM2oV2f0unkLP3vt7JB0ebWJsIAPXV1bhc6N1hg0nNk
debug1: private host key #2: ssh-ed25519 SHA256:9Dn7XT7NwOx3Kq8kXgBYdFB269peNXi4uKfYHQVQl7g
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-D'
debug1: rexec_argv[2]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from 2.101.140.XXX port 55969 on 50.30.47.YYY port 22
debug1: Client protocol version 2.0; client software version PuTTY_Release_0.63
debug1: match: PuTTY_Release_0.63 pat PuTTY_Local:*,PuTTY-Release-0.5*,PuTTY_Release_0.5*,PuTTY_Release_0.60*,PuTTY_Release_0.61*,PuTTY_Release_0.62*,PuTTY_Release_0.63*,PuTTY_Release_0.64* compat 0x00004000
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4
debug1: permanently_set_uid: 110/65534 [preauth]
ssh_sandbox_child: setrlimit(RLIMIT_FSIZE, { 0, 0 }): Function not implemented [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 2819
debug1: audit_event: unhandled event 12

此外,如果我尝试,sudo我会得到类似的错误:

root@server:/etc/ssh# sudo date
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: setrlimit: Function not implemented
Wed Aug 15 15:26:54 UTC 2018

我该如何修复这个问题ssh_sandbox_child: setrlimit(RLIMIT_FSIZE, { 0, 0 }): Function not implemented [preauth]

相关内容