Cannot SSH to ubuntu server - openssh server owner changed

Posted by Kshitiz Shankar on Ask Ubuntu See other posts from Ask Ubuntu or by Kshitiz Shankar
Published on 2013-10-17T15:50:07Z Indexed on 2013/10/17 16:24 UTC
Read the original article Hit count: 509

Filed under:

I am using suPHP with Apache for virtual hosting but somewhere down the line my root ssh access is getting screwed up. I haven't been able to figure out why it is happening but eventually, my root user is not able to ssh to the server.

I get this error:

*** invalid open call: O_CREAT without mode ***: sshd: root@pts/3 terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f12fe871817]
/lib/x86_64-linux-gnu/libc.so.6(+0xeb7e1)[0x7f12fe8527e1]
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)[0x7f12fe78876d]
sshd: root@pts/3[0x407635]
======= Memory map: ========
00400000-00448000 r-xp 00000000 ca:02 4554758                            /usr/sbin/sshd
00647000-00648000 r--p 00047000 ca:02 4554758                            /usr/sbin/sshd
00648000-00649000 rw-p 00048000 ca:02 4554758                            /usr/sbin/sshd
00649000-00750000 rw-p 00000000 00:00 0
01794000-017b5000 rw-p 00000000 00:00 0                                  [heap]
7f12fd5ad000-7f12fd5c2000 r-xp 00000000 ca:02 3489844                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f12fd5c2000-7f12fd7c1000 ---p 00015000 ca:02 3489844                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f12fd7c1000-7f12fd7c2000 r--p 00014000 ca:02 3489844                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f12fd7c2000-7f12fd7c3000 rw-p 00015000 ca:02 3489844                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f12fd7c3000-7f12fd7db000 r-xp 00000000 ca:02 3489977                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7f12fd7db000-7f12fd9db000 ---p 00018000 ca:02 3489977                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7f12fd9db000-7f12fd9dc000 r--p 00018000 ca:02 3489977                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7f12fd9dc000-7f12fd9dd000 rw-p 00019000 ca:02 3489977                    /lib/x86_64-linux-gnu/libresolv-2.15.so
7f12fd9dd000-7f12fd9df000 rw-p 00000000 00:00 0
7f12fd9df000-7f12fd9e6000 r-xp 00000000 ca:02 3489994                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7f12fd9e6000-7f12fdbe5000 ---p 00007000 ca:02 3489994                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7f12fdbe5000-7f12fdbe6000 r--p 00006000 ca:02 3489994                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7f12fdbe6000-7f12fdbe7000 rw-p 00007000 ca:02 3489994                    /lib/x86_64-linux-gnu/libnss_dns-2.15.so
7f12fdbe7000-7f12fdd27000 rw-s 00000000 00:04 6167294                    /dev/zero (deleted)
7f12fdd27000-7f12fdd33000 r-xp 00000000 ca:02 3489984                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f12fdd33000-7f12fdf32000 ---p 0000c000 ca:02 3489984                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f12fdf32000-7f12fdf33000 r--p 0000b000 ca:02 3489984                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f12fdf33000-7f12fdf34000 rw-p 0000c000 ca:02 3489984                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f12fdf34000-7f12fdf3e000 r-xp 00000000 ca:02 3489979                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f12fdf3e000-7f12fe13e000 ---p 0000a000 ca:02 3489979                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f12fe13e000-7f12fe13f000 r--p 0000a000 ca:02 3489979                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f12fe13f000-7f12fe140000 rw-p 0000b000 ca:02 3489979                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f12fe140000-7f12fe157000 r-xp 00000000 ca:02 3489996                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f12fe157000-7f12fe356000 ---p 00017000 ca:02 3489996                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f12fe356000-7f12fe357000 r--p 00016000 ca:02 3489996                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f12fe357000-7f12fe358000 rw-p 00017000 ca:02 3489996                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f12fe358000-7f12fe35a000 rw-p 00000000 00:00 0
7f12fe35a000-7f12fe362000 r-xp 00000000 ca:02 3489985                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f12fe362000-7f12fe561000 ---p 00008000 ca:02 3489985                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f12fe561000-7f12fe562000 r--p 00007000 ca:02 3489985                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f12fe562000-7f12fe563000 rw-p 00008000 ca:02 3489985                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f12fe563000-7f12fe565000 r-xp 00000000 ca:02 3489886                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f12fe565000-7f12fe765000 ---p 00002000 ca:02 3489886                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f12fe765000-7f12fe766000 r--p 00002000 ca:02 3489886                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f12fe766000-7f12fe767000 rw-p 00003000 ca:02 3489886                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f12fe767000-7f12fe91c000 r-xp 00000000 ca:02 3489888                    /lib/x86_64-linux-gnu/libc-2.15.so
7f12fe91c000-7f12feb1b000 ---p 001b5000 ca:02 3489888                    /lib/x86_64-linux-gnu/libc-2.15.so
7f12feb1b000-7f12feb1f000 r--p 001b4000 ca:02 3489888                    /lib/x86_64-linux-gnu/libc-2.15.so
7f12feb1f000-7f12feb21000 rw-p 001b8000 ca:02 3489888                    /lib/x86_64-linux-gnu/libc-2.15.so
7f12feb21000-7f12feb26000 rw-p 00000000 00:00 0
7f12feb26000-7f12feb2f000 r-xp 00000000 ca:02 3489983                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7f12feb2f000-7f12fed2f000 ---p 00009000 ca:02 3489983                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7f12fed2f000-7f12fed30000 r--p 00009000 ca:02 3489983                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7f12fed30000-7f12fed31000 rw-p 0000a000 ca:02 3489983                    /lib/x86_64-linux-gnu/libcrypt-2.15.so
7f12fed31000-7f12fed5f000 rw-p 00000000 00:00 0
7f12fed5f000-7f12fef10000 r-xp 00000000 ca:02 3489831                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f12fef10000-7f12ff110000 ---p 001b1000 ca:02 3489831                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f12ff110000-7f12ff12b000 r--p 001b1000 ca:02 3489831                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f12ff12b000-7f12ff136000 rw-p 001cc000 ca:02 3489831                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f12ff136000-7f12ff13a000 rw-p 00000000 00:00 0
7f12ff13a000-7f12ff150000 r-xp 00000000 ca:02 3490020                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f12ff150000-7f12ff34f000 ---p 00016000 ca:02 3490020                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f12ff34f000-7f12ff350000 r--p 00015000 ca:02 3490020                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4Connection to stageserver.dockphp.com closed.

After some debugging, I was able to narrow it down to a few things. For some reason the sshd daemon is running as root:www-data (apache user) instead of root. My ftp connection works but ssh over terminal fails. I have no idea whether it is getting caused due to suPHP or not (because that is the only place where user permission's etc. change).

I really need to narrow it down and fix it asap.

Thanks a lot!

© Ask Ubuntu or respective owner

Related posts about apache2