4

I have a Raspberry Pi 3, which I have been running headless with Raspbian Jessie. Recently I flashed Stretch to my SD card, but when I boot that on my Pi, I can't connect to it over SSH. A little research tells me that Stretch doesn't have SSH enabled by default, so some changes must be made to the boot partition. I tried saving a blank file titled ssh and another file titled wpa_supplicant.conf, containing the code shown below, to the boot partition however this still doesn't work. When I boot this on my Pi it still fails to connect over SSH and doesn't appear on scans of the network. If I plug the SD card back into my laptop, the two files I saved to it are gone. What should I do?

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="Network SSID"
    scan_ssid=1
    psk="Password"
    key_mgmt=WPA-PSK
}

network={
    ssid="Dummy SSID"
    scan_ssid=1
    psk="Dummy Password"
    key_mgmt=WPA-PSK
}    
  • I just tested Stretch with headless connection like you described yesterday, and it is works perfectly. You ssh using assuming the old IP address is the same as when running Jessie? or you find out the new IP from router? – hcheung Aug 24 '17 at 0:02
  • I've tried both. If I use the old IP address, then I get a connection timed out error, but if I run an arp -a scan, the Pi doesn't show up. – user72317 Aug 24 '17 at 11:58
  • I seem to be having the same issue today. I've set up several PIs on my local network. This round with Stretch, I keep getting connection reset messages when I attempt to connect via my Mac. I'm digging for a solution now. – Christopher Stevens Aug 26 '17 at 3:22
  • Update: Switching back to Jessie, I was able to connect right away using the usual WPA-PSK settings. I can confirm that something is different, for better and/or worse. At this time for my deadline, I'm using Jessie. Stretch is still pretty new, and I bet a bug fix or updated instructions can be found soon. – Christopher Stevens Aug 26 '17 at 4:07
  • The actual SSH enabling should just be a matter of adding the "ssh" file, as always! In my experience, only the WiFi setup caused a few troubles as most tutorials for older Raspbian versions don't work. – unixb0y May 9 '18 at 19:46
1

From a terminal window

sudo raspi-config

Then select Interfaces > SSH

Enable SSH and reboot. Use a LAN scanner on your phone (Fing) to locate the IP and check the services that are running.

0

It seems that every "/etc/ssh/ssh_host*" files are empty... So it make an error (invalid format) wich can be seen in "/var/log/auth.log" file.

If you have a Linux computer, try to open the "/etc/ssh" directory of your SD card, and then replace "ssh_host*" files by the ones you have on your computer... (it has worked for me)

Good luck!

PS: Sorry if my english is bad, I'm not fluent...

-1

I'm using Stretch and I just needed to create a empty file called ssh in boot partition to enable ssh access.

  • 1
    Note that the author mentioned in the question that they already tried this, but it didn't work, unfortunately, so this isn't the solution. – Aurora0001 Oct 21 '17 at 19:20
  • @Aurora0001 I second jefferson's answer, though! In my case, this always worked, so I assume the SSH is not the author's issue somehow! – unixb0y May 9 '18 at 19:47

Your Answer

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