ps: I know that I just have to put a file names ssh in /boot, but that's not what I want

I have a raspberry pi running Raspbian Desktop and unfortunately it still didn't migrate everything to systemd. I'm following raspi-config ssh activation script and simulating update-rc in my SD card by renaming the rcX.d symlinks from K01ssh to S01ssh in the r2c.d, r3c.d, r4c.d, r5d.c. However, even after this the ssh daemon won't start in boot. If, however, I type sudo service ssh start in the raspberry terminal, the ssh starts. Does it mean that ssh is a systemd service or that it recognized the rcX.d symlinks I did?

I want to make ssh start by just editing the / tree, not messing with /boot.

ps: I know it can be made through raspi-config, but I need to activate it before the SD card's first boot and I don't wanna touch the /boot partition

  • 1
    I'm not sure what you're trying to do here. You can just enable the ssh service using raspi-config, it will be persistent throughout boots. Why do you want to do all the manual stuff?
    – 88weighed
    Oct 7, 2017 at 9:18
  • 1
    This sounds like you want to modify the master image before burning to a card and booting for the 1st time on a new RPi. You could simply mount the partitions after burning and create the necessary ssh and (if needed) wpa_supplicant.conf files. I'm not sure why you want to use the old init script process as part of this. Is that a key part of what you want to do, or just the best solution you've encountered so far?
    – bobstro
    Oct 11, 2017 at 11:04
  • 5
    I don't entirely know what you mean, but see my answer below! Oct 14, 2017 at 5:43
  • 1
    If sshd is your only issue have you tried to uninstall it completely then reinstall it?
    – user29510
    Oct 14, 2017 at 19:13

2 Answers 2


I am not entirely sure why you insist on:

make ssh start by just editing the / tree, not messing with /boot.

But, I think you don't want to create the 'SSH' file on /boot, so I get that.

Here is how I enable ssh:

sudo systemctl enable ssh
sudo systemctl enable ssh.socket

I'm not actually certain that ssh.socket must be enabled separately, that's just "works for me" kind of laziness...


If I understand correctly, you want to start ssh at boot? sudo service ssh start won't start at boot but that allows you to start it manually. You could use a system cron? To do that use:

Make sure nano is installed

sudo apt-get install nano

Then when it's installed:

cd /home/pi

The Above is For saving file in pi directory

Sudo nano ssh-boot.sh

The above name came really be anything as your really just creating a new file just make sure it has the .sh extension! Add the following to ssh-boot.sh:

sudo service ssh start

Save the file with ctrl+ x and then the key to save the file! Then open the cron tab to edit! The -e is for edit:

cd ~

The above is to change directory to the default one!

sudo crontab -e

If you have never used this then you may have to select an editor option! So press 1 or 2 As you desire! After you select, add @reboot /home/pi/ssh-boot.sh To the bottom of the file!

Then start the cron tab:

/etc/init.d/cron start

You can check if it's enabled with:

sudo crontab -i

The i is for info!

I hope that helped and that I'm correct in what your issue was!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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