SSHD 预身份验证子项由信号 31 终止



前几天我升级到了ubuntu 18.04,从那以后我再也无法ssh到我的机器了。身份验证.log告诉我:

Jan 15 08:41:15 pc207 sshd[5358]: Accepted publickey for oscar from 10.60.0.15 port 42004 ssh2: RSA SHA256:59dtkmxMKMJG22+SQEoo7D55JSr+xlFjRyLMclLY210
Jan 15 08:41:15 pc207 sshd[5358]: debug1: monitor_child_preauth: oscar has been authenticated by privileged process
Jan 15 08:41:16 pc207 sshd[5358]: debug1: monitor_read_log: child log fd closed
Jan 15 08:41:16 pc207 sshd[5358]: fatal: privsep_preauth: preauth child terminated by signal 31

虽然ssh -vvv localhost告诉我:

debug1: Authentication succeeded (publickey).
Authenticated to localhost ([127.0.0.1]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
packet_write_wait: Connection to 127.0.0.1 port 22: Broken pipe

谷歌告诉我将UsePrivilegeSeparation设置为yesnosandbox,但它什么也没做。我的/etc/ssh/sshd未修改。

编辑:我也将我的个人笔记本电脑升级到18.04(HP Elitebook 8570w,与上述固定戴尔完全无关(,当我尝试ssh到我的笔记本电脑时,发生了完全相同的错误; preauth child被信号31终止。

希望可以帮助遇到同样问题的人,这个问题让我挣扎了至少两周......最后通过将"沙盒"值修改为"是"来修复它,我不知道逻辑,如果有人可以帮助解释为什么这有效,将不胜感激:在 sshd 配置文件(/etc/ssh/sshd_config(中,你可以找到以下行:

从:

UsePrivilegeSeparation sandbox # Default for new installations.

UsePrivilegeSeparation yes

我为

这个错误挣扎了好几天。没有一个解决方案对我有用。我终于更新了ssh服务器并连接了。真是无赖。希望我有更好的答案。

升级后,我的 debian 服务器上现在遇到了同样的错误。经过几个小时的挖掘(上述解决方案没有帮助(,我发现我正在使用 lilo(由于这台相当旧的服务器上的 sw raid(并且内核版本没有更新。在过去的几天里,我从 sarge 变成了靶心(老实说,只克服了一次痛苦,希望再有 15 年的稳定服务器:)(,问题是 lilo.conf 在此期间没有更新,所以即使是新的测试也在旧的 2.6 上运行。因此,在更新 lilo.conf 并使用新内核重新启动后,它开始工作。顺便说一句,甚至上面的 sshd 参数 UsePrivilegeSeparation 现在也被弃用了(但即使没有它它也能运行良好。

最新更新