7

In the last release (2.1) of NOOBS the developers have "disabled by default" SSH, so it's not possible anymore to connect to a Raspbian via SSH, which is installed via NOOBS, without enabling SSH after the installation.

For my purposes it's very important, that I can install Raspbian silently (silent install) via NOOBS and be able to connect to it via SSH without any manual changes.

Does anybody know, if it's possible to preconfigure the NOOBS package to enable SSH at all again? (for example similar the way to preconfigure the silent install)

PS: It's not an option for me to install Raspbian without NOOBS, I absolutely need to go with NOOBS.

Update:

Like @techraf wrote in a comment, there is a similar post with the same question, which offers the way using a Raspbian image to flash a SD card. Flashing a SD card is too complicated, due to the fact that I'm working with "NOOB" user, which I want to support using SSH in the background.

4
  • Possible duplicate of Installing Raspbian from NOOBS without display V2.1 and beyond
    – techraf
    Commented Dec 26, 2016 at 21:52
  • Thanks for the answer @techraf, I keep this in mind but I'd like to wait, if maybe someone has an idea to fix it using NOOBS. Commented Dec 26, 2016 at 22:43
  • 1
    But your keeping in mind does not change the fact that this is exactly the same question.
    – techraf
    Commented Dec 26, 2016 at 22:47
  • 1
    If you read the Foundation documentation for NOOBS you will see a keyboard and display are REQUIRED. It is not intended for headless installation. If you really MUST have NOOBS you need a keyboard and display, at least for initial setup.
    – Milliways
    Commented Dec 26, 2016 at 22:56

3 Answers 3

7

You just need to add a file named 'ssh' to the noobs partition (you can do it right when copying fresh noobs files to a clean sd card) and it will enable ssh for raspbian when you install it from this noobs setup (including for subsequent raspbian reinstalls, i.e. this 'ssh' file on noobs partition will be persistent and have effect for every time you (re)install raspbian).

This will work because raspbian partition_setup.sh (that is run by noobs at end of rasbian install) will intentionally copy the 'ssh' file to the raspbian boot partition and... as widely documented 'ssh' file on raspbian boot partition will enable ssh.

3

I don't think this is possible. This is only possible in Raspbian installation not in NOOBS as it requires at least a keyboard.

But if you really want a silent NOOBS installation to every Raspi you have, this is the step.

  1. You have to completely install NOOBS in a Raspi (you should have keyboard of course)
  2. Update it and Upgrade (sudo apt-get update && sudo apt-get upgrade)
  3. Just incase run this on the terminal: sudo apt-get install openssh-server
  4. Follow this article on How to Use Putty for Raspberry Pi connected in Ethernet Port
  5. Remove your SD card and put it back to your computer and make a backup image using WIN32 Disk Imager.

By restoring the image, you can install NOOBS to every Raspi you have WITHOUT manually installing it, nor plugging keyboard and mouse. All you need is a computer and a SD card then it's just plug and connect.

1
  • One drawback of this approach is that your SSH host key will be embedded in the backup image, so every newly-installed Pi will have the same host key. This is not unsolvable -- you just have to run a script to regenerate a new host key on each Pi after you set it up. Perhaps an Ansible script on your "master" installation-controlling machine could SSH into each newly-installed Pi, generate a new host key, and print that newly-generated host key to the Ansible script's output so you can capture it in your known_hosts file.
    – rmunn
    Commented Mar 16, 2017 at 2:14
0

Assuming you has access to a Linux OS and the NOOBS file you are using is called noobs.zip

unzip noobs.zip
fdisk -l noobs.img

Get the Start value for the Linux Type device and multiply it by Sector Size. For instance: 532480 x 512 = 272629760 Then use this value as an offset to mount the img in a folder

mkdir noobs_mountpoint
sudo mount -o loop,offset=272629760 noobs.img noobs_mountpoint

Edit the noobs_mountpoint/etc/rc.local and add the command required to start the ssh server. For example:

systemctl ssh start

Note: The command needs to be added before the "exit 0" line.

Then exit from the mounted folder and umount it.

cd ..
sudo umount noobs_mountpoint

Now you can use 'dd' or your preferred tool to copy the img file into the SD card.

The system will start the ssh service at startup time.

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.