Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having troubles to connect to my server via SSH. It runs Ubuntu 12.10. I can access the server using a normal user, but I can't access it using root. It seems ssh authenticates well, but the problem happens just after it let me in. Here's the output:

$ ssh root@myserver.dyndns.org
root@myserver.dyndns.org'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.

Any idea of what to do? Thanks for your help!

share|improve this question
    
Were you previously able to access the server (as root) successfully? Have there been any recent updates on the system? Are you able to access root by logging in as another user and then using sudo or su? Or are you locked out? –  larsks Jul 30 '13 at 18:32
    
Yes, I was able to access as root before. I frequently upgrade the server, but don't know what broke ssh. I can access as a normal sudoer user, and then do sudo su to gain access to root. –  Throoze Jul 30 '13 at 18:38
    
What is output of ssh -V ? –  user160910 Jul 30 '13 at 18:44
    
OpenSSH_5.9p1, SSH protocols 1.5/2.0, OpenSSL 0x1000100f –  Throoze Jul 30 '13 at 18:45
    
This post suggests that reinstalling the openssh-server package fixed the same error for someone else (on an older version of Ubuntu). Have you tried that yet? –  larsks Jul 30 '13 at 19:11

1 Answer 1

up vote 1 down vote accepted

This post solved my problem. It was because of the following files:

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

which were preventing aptitude from properly upgrade openssh-server.

After following the instructions on the mentioned post, just did:

$ sudo aptitude reinstall openssh-server ssh

And problem solved!

share|improve this answer
    
Problem is solved the same way for Ubuntu 10.04 –  ilko Nov 2 '13 at 16:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.