SSH 无效的打开调用:O_CREAT 无模式

SSH 无效的打开调用:O_CREAT 无模式

我在通过 SSH 连接到服务器时遇到了麻烦。它运行的是 Ubuntu 12.10。我可以使用普通用户访问服务器,但无法使用 root 访问它。似乎 ssh 验证得很好,但问题就在它让我进入后发生了。以下是输出:

$ ssh [email protected]
[email protected]'s password: 
*** invalid open call: O_CREAT without mode ***: sshd: root@pts/3 terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7ff1e31b9817]
/lib/x86_64-linux-gnu/libc.so.6(+0xeb7e1)[0x7ff1e319a7e1]
sshd: root@pts/3[0x41a542]
sshd: root@pts/3[0x41a9eb]
sshd: root@pts/3[0x41aeb8]
sshd: root@pts/3[0x409630]
sshd: root@pts/3[0x40f9ed]
sshd: root@pts/3[0x410dd6]
sshd: root@pts/3[0x411994]
sshd: root@pts/3[0x411f16]
sshd: root@pts/3[0x40b253]
sshd: root@pts/3[0x42be24]
sshd: root@pts/3[0x40c9cb]
sshd: root@pts/3[0x412199]
sshd: root@pts/3[0x4061a2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7ff1e30d076d]
sshd: root@pts/3[0x407635]
======= Memory map: ========
00400000-00448000 r-xp 00000000 08:05 5914634                            /usr/sbin/sshd
00647000-00648000 r--p 00047000 08:05 5914634                            /usr/sbin/sshd
00648000-00649000 rw-p 00048000 08:05 5914634                            /usr/sbin/sshd
00649000-00750000 rw-p 00000000 00:00 0 
0104c000-0106d000 rw-p 00000000 00:00 0                                  [heap]
7ff1e1aef000-7ff1e1b04000 r-xp 00000000 08:05 4722225                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff1e1b04000-7ff1e1d03000 ---p 00015000 08:05 4722225                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff1e1d03000-7ff1e1d04000 r--p 00014000 08:05 4722225                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff1e1d04000-7ff1e1d05000 rw-p 00015000 08:05 4722225                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff1e1d05000-7ff1e1d07000 r-xp 00000000 08:05 4718645                    /lib/libnss_mdns4.so.2
7ff1e1d07000-7ff1e1f06000 ---p 00002000 08:05 4718645                    /lib/libnss_mdns4.so.2
7ff1e1f06000-7ff1e1f07000 r--p 00001000 08:05 4718645                    /lib/libnss_mdns4.so.2
7ff1e1f07000-7ff1e1f08000 rw-p 00002000 08:05 4718645                    /lib/libnss_mdns4.so.2
7ff1e1f08000-7ff1e1f20000 r-xp 00000000 08:05 4718655                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7ff1e1f20000-7ff1e2120000 ---p 00018000 08:05 4718655                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7ff1e2120000-7ff1e2121000 r--p 00018000 08:05 4718655                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7ff1e2121000-7ff1e2122000 rw-p 00019000 08:05 4718655                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7ff1e2122000-7ff1e2124000 rw-p 00000000 00:00 0 
7ff1e2124000-7ff1e212b000 r-xp 00000000 08:05 4722324                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7ff1e212b000-7ff1e232a000 ---p 00007000 08:05 4722324                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7ff1e232a000-7ff1e232b000 r--p 00006000 08:05 4722324                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7ff1e232b000-7ff1e232c000 rw-p 00007000 08:05 4722324                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7ff1e232c000-7ff1e232e000 r-xp 00000000 08:05 4718646                    /lib/libnss_mdns4_minimal.so.2
7ff1e232e000-7ff1e252d000 ---p 00002000 08:05 4718646                    /lib/libnss_mdns4_minimal.so.2
7ff1e252d000-7ff1e252e000 r--p 00001000 08:05 4718646                    /lib/libnss_mdns4_minimal.so.2
7ff1e252e000-7ff1e252f000 rw-p 00002000 08:05 4718646                    /lib/libnss_mdns4_minimal.so.2
7ff1e252f000-7ff1e266f000 rw-s 00000000 00:04 1104943                    /dev/zero (deleted)
7ff1e266f000-7ff1e267b000 r-xp 00000000 08:05 4722317                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7ff1e267b000-7ff1e287a000 ---p 0000c000 08:05 4722317                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7ff1e287a000-7ff1e287b000 r--p 0000b000 08:05 4722317                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7ff1e287b000-7ff1e287c000 rw-p 0000c000 08:05 4722317                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7ff1e287c000-7ff1e2886000 r-xp 00000000 08:05 4718664                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7ff1e2886000-7ff1e2a86000 ---p 0000a000 08:05 4718664                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7ff1e2a86000-7ff1e2a87000 r--p 0000a000 08:05 4718664                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7ff1e2a87000-7ff1e2a88000 rw-p 0000b000 08:05 4718664                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7ff1e2a88000-7ff1e2a9f000 r-xp 00000000 08:05 4722326                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7ff1e2a9f000-7ff1e2c9e000 ---p 00017000 08:05 4722326                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7ff1e2c9e000-7ff1e2c9f000 r--p 00016000 08:05 4722326                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7ff1e2c9f000-7ff1e2ca0000 rw-p 00017000 08:05 4722326                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7ff1e2ca0000-7ff1e2ca2000 rw-p 00000000 00:00 0 
7ff1e2ca2000-7ff1e2caa000 r-xp 00000000 08:05 4722318                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7ff1e2caa000-7ff1e2ea9000 ---p 00008000 08:05 4722318                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7ff1e2ea9000-7ff1e2eaa000 r--p 00007000 08:05 4722318                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7ff1e2eaa000-7ff1e2eab000 rw-p 00008000 08:05 4722318                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7ff1e2eab000-7ff1e2ead000 r-xp 00000000 08:05 4718631                    /lib/x86_64-linux-gnu/libdl-2.15.so
7ff1e2ead000-7ff1e30ad000 ---p 00002000 08:05 4718631                    /lib/x86_64-linux-gnu/libdl-2.15.so
7ff1e30ad000-7ff1e30ae000 r--p 00002000 08:05 4718631                    /lib/x86_64-linux-gnu/libdl-2.15.so
7ff1e30ae000-7ff1e30af000 rw-p 00003000 08:05 4718631                    /lib/x86_64-linux-gnu/libdl-2.15.so
7ff1e30af000-7ff1e3264000 r-xp 00000000 08:05 4718632                    /lib/x86_64-linux-gnu/libc-2.15.so
7ff1e3264000-7ff1e3463000 ---p 001b5000 08:05 4718632                    /lib/x86_64-linux-gnu/libc-2.15.so
7ff1e3463000-7ff1e3467000 r--p 001b4000 08:05 4718632                    /lib/x86_64-linux-gnu/libc-2.15.so
7ff1e3467000-7ff1e3469000 rw-p 001b8000 08:05 4718632                    /lib/x86_64-linux-gnu/libc-2.15.so
7ff1e3469000-7ff1e346e000 rw-p 00000000 00:00 0 
7ff1e346e000-7ff1e3477000 r-xp 00000000 08:05 4722316                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7ff1e3477000-7ff1e3677000 ---p 00009000 08:05 4722316                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7ff1e3677000-7ff1e3678000 r--p 00009000 08:05 4722316                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7ff1e3678000-7ff1e3679000 rw-p 0000a000 08:05 4722316                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7ff1e3679000-7ff1e36a7000 rw-p 00000000 00:00 0 Connection to myserver.dyndns.org closed.

知道该怎么办吗?谢谢你的帮助!

答案1

这个帖子解决了我的问题。这是因为以下文件:

/usr/bin/ssh
/usr/sbin/sshd

这阻碍了aptitude正确升级openssh-server

按照上述帖子中的说明操作后,只需执行以下操作:

$ sudo aptitude reinstall openssh-server ssh

问题解决了!

相关内容