0

Okay, this might be a weird one haha

I have a server, it’s an ARM based server, and I have no KVM, but I do have network boot and a recovery mode live environment (Debian based).

The server only comes with Debian 7 and 8 install options, and I want to use CentOS on it. I was able to use my host’s control panel to tell the server to network boot into a live recovery environment, then told it to do a hard reboot on the machine, I got the email with the login details, logged in to the live environment and proceeded to do the following,

I went ahead and used a command I came up with, wget -O- 'http://(IP redacted)/CentOS-Userland-7-armv7hl-Minimal-1708-CubieTruck.img' | dd of=/dev/sda to install the latest CentOS 7 arm image onto this arm based system, then changed the netboot back to the HDD and did a hard restart again.

The server came online and was pingable, indicating CentOS 7 was running on the system and had configured itself on the network via DHCP, which is awesome!

Now all I need to do is SSH into it and I’d be good to go, but here’s where the issue happens, sshd isn’t running and I thus cannot ssh into it.

So I went ahead and put it back into the live recovery environment, mounted the disk and I could see all the system files, the image had installed correctly, and everything was there. I then proceeded to use chroot to set the root and user passwords, and then started looking up how I could enable sshd manually.

It seemed the solution was this, using the help of this article here https://unix.stackexchange.com/a/159293 I needed to manually create a symlink from /usr/lib/systemd/system/sshd.service to /etc/systemd/system/multi-user.target.wants/sshd.service then reboot and I should have working ssh.

I did this and when I rebooted it came up, was pingable but I still couldn’t SSH into it.

This is where I’m asking for help, does anyone know of any way to enable a systemd service (such as sshd) manually, externally via a live environment?

2
  • How do you know sshd isn't running? How do you know it's not firewalled off?
    – phemmer
    Dec 31, 2017 at 4:53
  • ln -s /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service Should work for you. You need to check your sshd_config, your firewall and that the username you're using to login is allowed.
    – jdwolf
    Dec 31, 2017 at 16:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.