Just loaded a new image of PIXEL for my Pi 3 . I enabled SSH via raspi-config but was unable to access using SSH (via PuTTY). Tried putting ssh file in /boot/ directory and still didn't work. Any other suggestions on how to access my pi headless?
2 Answers
Since you provide zero details, let's get started:
Firstly, make sure that the IP on the Pi is correct, if static. If it's dynamic, search for it with an "IP Scanner" until you find a device named like raspberry.
Once found, try to connect to port 22 (SSH).
If it throws an error, put the card in the PC and be sure that the ssh
file is in the main directory of the card, since Windows only shows the boot partition.
Also make sure, that the file is only named ssh
- nothing more, nothing less. Under Windows, when you create an "empty" text file, it puts .txt
as default file extension and hides it from you, so you wil only see ssh
, but actually it is an .txt
.
To prevent this from happening, search in Windows for "Folder Options" and in the list, disable the tick box named: "Hide file extension on known file types".
After that, go into the directory again and remove the .txt
on the end of the file and confirm the warning dialog.
Make sure that you have assigned a static ip to your pi. If you are not sure about it then then scan your network using fing(or other relevant apps) on your android phone and get ip address of raspberry pi.
Assign a static ip to your pi from DHCP settings of your router if you haven't done.
If you have enabled SSH before loading new image revisit raspi-config. Make sure you have selected SSH on your putty.Hope it helps!
sudo service ssh status
. If there are any errors like error:Could not load host key:
then clean up the files using the commandsudo rm -f /etc/ssh/ssh_host*
. Then performsudo service ssh restart
. That should get you going fine.