0

I have a remote Ubuntu 16.04 server that I can't reach via ssh after I shut it down and booted it again. I had OpenSSH Server installed during system installation and I never disabled it (e.g. systemctl disable or update-rc.d remove).

In order to find out the error I rebooted the server in rescue mode (via web interface of the server hoster) and chrooted to the root partition:

root@rescue ~ # mount /dev/md2 /mnt
root@rescue ~ # chroot /mnt

The filesystem looks fine so far, but there is no boot log (/var/log/boot or similar). The syslog ends exactly at the time when I shut down the server, no new entries seem to have been added.

I found out that as per 16.04 I have to use journalctl to get the logs so I tried:

root@rescue ~ # journalctl
No journal files were found.
-- No entries --

The ssh server might not be the primary problem since I have a rather sophisticated network configuration including routes to a failover ip (the server being a node of a ha-cluster). Some other service could be failing so that ssh server doesn't start up.

Nevertheless I tried to enable ssh on startup:

root@rescue ~ # systemctl enable ssh
Synchronizing state of ssh.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable ssh

But to no avail, after shutdown -r now I still can't reach the server. nmap gives me

Host is up (0.037s latency).
Not shown: 996 closed ports
PORT     STATE    SERVICE
135/tcp  filtered msrpc
445/tcp  filtered microsoft-ds
593/tcp  filtered http-rpc-epmap
1720/tcp filtered H.323/Q.931

I just can't find a way to figure out what the problem might be. Could anybody give me a hint?

2 Answers 2

1

It turned out that I had an error in /etc/fstab so nothing could be written to the log files.

0

I think before

chroot /mnt

you have to

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys
1
  • I tried and mount shows all the devices mounted properly, but still no entries in journalctl
    – digijay
    Oct 30, 2018 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .