gautmout
Posts: 2
Joined: Tue Feb 27, 2018 9:31 pm

SSH not enable on Pre-intalled NOOBS

Tue Feb 27, 2018 9:52 pm

Hello,

I just bought an Raspberry with a Pre-installed NOOBS SD card. My problem is that I don't have any screen to plug to my raspberry. I thought that I could connect my computer to the raspberry through SSH but it seems that there is no SSH server launched by default.

After some readings, I read that I could put an empty file named "ssh" into the boot partition.
I managed to put the ssh file into the tar "boot.tar.xz" but it did not change anything.

Does somebody would know what to do ? (I could buy a screen and an HDMI cable yes)

Thanks in advance,

gautmout

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 2:13 am

NOOBS is really intended to be used with a screen, mouse and keyboard. NOOBS is also just an installer, it's not an OS. I don't know if there even is a way to get it working over SSH. If you want to use your Pi headless I would recommend you write a Raspbian image to your card.

This is the procedure I use for setting up headless boot with SSH and wireless network. It works with Raspbian Jessie or Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3B & Zero W, or a Raspbian compatible USB WiFi dongle on other models. Everything is done before you boot, and can be done on a Windows or Mac computer which only has access to the small FAT32 "boot" partition of a Raspbian imaged SD card.
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. Install Etcher and use it to write the Raspbian image to your SD card.
    • You don't need to extract the image or format the card prior to writing.
    • Just choose the Raspbian .zip, pick your SD card and write.
    • If you have trouble, verify the SHA256 checksum of the download.
  4. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the SD card (labelled "boot").
    • If you get a message telling you the card must be formatted, cancel it.
  5. On the small FAT32 "boot" partition, create a file with the name ssh (or ssh.txt). It can be empty, the contents don't matter.
  6. If you are connecting the Pi to your router with an Ethernet cable, you can eject the card and use it to boot your Pi now.
  7. To connect to a wireless network, create another file on the card called wpa_supplicant.conf, which has the following inside:

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=US
    
    network={
         ssid="Your network name/SSID"
         psk="Your WPA/WPA2 security key"
         key_mgmt=WPA-PSK
    }
    • Edit country=, ssid= and psk= with your information and save the file.
  8. Make sure that both files are in the base directory of the small FAT32 partition, not in any folder.
  9. Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file. If it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network. Give your Pi some time to boot and connect to your network (the first boot always takes a bit longer), then you should be able to SSH into the Pi and configure it how you like.

If you have attempted this and failed, then unplugged the power to turn off your Pi, you should start over with a freshly imaged card. Improperly powering down the Pi can cause SSH key generation to fail, which will prevent SSH logins.

If you have a Zeroconf network service installed (Apple's iTunes, Bonjour or Quicktime install Zeroconf), you can SSH into pi@raspberrypi.local (provided you don't have any other Pi computers on your network with the same default hostname). Otherwise you must SSH into your Pi's IP address, which you can find my logging into your router and checking the list of connected clients, or using a network scanner app (like Fing for smartphones) to find your Pi on your network.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 3:14 am

gautmout wrote:
Tue Feb 27, 2018 9:52 pm
empty file named "ssh" into the boot partition.
I managed to put the ssh file into the tar "boot.tar.xz" but it did not change anything.
just create/copy that ssh file on the SD ( like from windows is only one visible partition... )
not into a xz file...

User avatar
procount
Posts: 2211
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 7:56 am

NOOBS will not work over ssh because it has a graphical interface. You can run it over vnc by adding:

Code: Select all

vncinstall forcetrigger
to recovery.cmdline.
Add the empty ssh file to the noobs partition and it will copy it to Raspbian when it is installed to enable ssh in raspbian.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 8:10 am

NOOBS will enable SSH for raspbian if there is a SSH file present on the boot partition ... but ONLY on a first fresh installation (it's run from noobs partition_setup.sh)

You can also add silentinstall to recovery.cmdline to run the install without a screen (wait 10 mins)

For headless it's much better to use pure raspbian via etcher though as HawaiianPi says above.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

gautmout
Posts: 2
Joined: Tue Feb 27, 2018 9:31 pm

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 12:35 pm

Thank you very much for your replies ! I will try to write a raspbian on my sd card directly. I think it is the best solution.

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 12:45 pm

procount wrote:
Wed Feb 28, 2018 7:56 am
NOOBS will not work over ssh because it has a graphical interface. You can run it over vnc by adding:

Code: Select all

vncinstall forcetrigger
to recovery.cmdline.
Add the empty ssh file to the noobs partition and it will copy it to Raspbian when it is installed to enable ssh in raspbian.
Just out of curiosity, have you sort of merged NOOBS and PINN in your mental picture of the world.

It looks that way from some of your recent posts. I've seen you make statements, such as the above, of the form "NOOBS does XXX" where, as far as I know, only PINN does XXX. It is as if TPTB have actually taken to heart the idea of making PINN the official version of NOOBS. Is that so?
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 12:53 pm

Specifically regarding the ssh-enabling flag file, this has been an option in NOOBS supported by the RPF for the last 12 months:

From: http://downloads.raspberrypi.org/raspbi ... _notes.txt

2017-03-02:
* Updated kernel and firmware (final Pi Zero W support)
* Wolfram Mathematica updated to version 11
* NOOBS installs now checks for presence of 'ssh' file on the NOOBS partition.

User avatar
procount
Posts: 2211
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: SSH not enable on Pre-intalled NOOBS

Wed Feb 28, 2018 3:06 pm

n67 wrote:
Wed Feb 28, 2018 12:45 pm
Just out of curiosity, have you sort of merged NOOBS and PINN in your mental picture of the world.

It looks that way from some of your recent posts. I've seen you make statements, such as the above, of the form "NOOBS does XXX" where, as far as I know, only PINN does XXX. It is as if TPTB have actually taken to heart the idea of making PINN the official version of NOOBS. Is that so?
An interesting comment! I don't know where to start. :shock: But I'll try to be brief.
  1. PINN is a fork of NOOBS, so probably >60% of it is the same as NOOBS. I have often "merged" commits from NOOBS into PINN, so I like to think I know the difference between them. ;) How is your mental picture of the world different to mine?
  2. All of the statements I made in this thread are relevant to NOOBS (as well as PINN, but the OP was asking about NOOBS):
    1. NOOBS has supported vncinstall since almost its beginning.
    2. ssh copying has been there for almost a year.
    3. Do you have any examples where I have stated NOOBS does something that only PINN does? I'd like to correct them if I haven't already.
  3. I am not one of TPTB, so I don't know their plans.
What I do know is that they have stated there are no plans to add any more features to NOOBS. Maybe they think it has satisfied their goals, or they have more important things to use their resources on, or Etcher has now filled the gap that was there before? I can only speculate.

I am very grateful to the NOOBS developers who have helped me immensely on my journey of discovery developing PINN. I have also fed back many changes from PINN to NOOBS - some have been accepted, and some not. I doubt they would drop NOOBS in favour of PINN because they serve different use-cases.

NOOBS is as minimalistic as possible to get beginners going with some carefully selected and maintained operating systems. On the other hand, I am adding features to PINN to make it a more useful rescue/recovery/administrative tool for OS installations. I am also trying to add as many OSes to it as possible, thus providing a showcase of what is available. There is room for both. Take your pick.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Return to “Beginners”