If you got a "denied" error when logging in like I did, this was helpful: Recently, the default user setup of Raspbian was significantly changed, rendering most existing online tutorials invalid. In essence, the default pi user no longer exists, so you have to create it and set its password using either the official Imager tool or by creating a userconf file in the boot partition of your microSD card, which should contain a single line of text: username:hashed-password, replacing username with the name of the user you want (e.g., pi) and hashed-password with the hash of the password you want.
to add to this: hit Ctrl-Shift-S in raspberry pi imager (or hit the settings "gear" icon) to open a 'secret' menu. From there, you can enable ssh and join wifi without creating the files in this video.... but the ending is still helpful, to rename the hosts! Thanks for an awesome video Tony
Raspberry imager tool allows you to edit OS settings before writing to Micro. Create your hostname, username/password, wifi configurations, and enable ssh before writing to avoid creating the files manually.
Pro tip: For whatever reasons if none of the methods are working for you. Just find a monitor for 1 time use (maybe from someone who has monitor or from computer lab). connect to monitor via hdmi. Then connect to your wifi inside raspberry os ... boom you've done what is required. From next time you can access it remotely via vnc. just set up ssh before vnc. also your laptop should be connected on same network.
This was very insightful, easy-to-follow, and appropriate for beginner/novice developers. Thank you very much for your patient and methodical instructions.
This was a great tutorial. I followed all instructions an even linked to your website. However, I getting this error: Permission denied (publickey,password). I even reset my pw to something very simple so I wouldn't mistype. I can ping the Raspberry Pi, but cannot log in via SSH. Any ideas?
i have the same problem, no matter how many times i type my password or change it to new one I always get the permission denied message, haven't got passed that point :(
@@pransukh8250 the solution was it doesnt worked via ssh initial. So i connected the Pi to my Monitor and my keyboard and run the configuration locally. After the first setup i hang the pi into the wireless and it worked even with ssh for me
@@Sensance Thanks for reply, what i did to resolve my issue, i just created userconf file and put USERNAME:HASHED_PASSWORD and saved it and then logged in with same credentials what i have defined in userfconf file and it worked. according to raspberry official guide lines user pi is not defined in new installation we need to do it on our own.
I tried copying the files using Windows explorer, and it looked like they copied, but when I refreshed they weren't there. Note that when I installed the image, it partitioned the SD card into two drives. Is that right?
hands on the best tutorial. the only missing part is how should I edit the with vim command ? I kept pressing all buttons till eventually it started editing. and how do you save ? ... the proper way
I have the correct IP address and ran the ssh pi@IPADDRESS command. I tried 'raspberry' as the password but i keep getting permission denied. I have not used this raspberry pi, and have only done the things that this video said to do. Help please
Does the procedure to discover the IP address work if you have direct connection from the Raspberry Pi using an Ethernet cable to the Ethernet port on the PC ?
Great video, very clear, thnx Tony! Following your instruction, as soon as use the ssh command line to connect to the Pi, (ssh pi@), I get this response: 'ssh: connect to host 192.168.2.230 port 22: Operation timed out' I have set a rule for port forwarding on port 22 at my router. Can you please advise what is wrong?
I found the issue: the DHCP assigned IP-address didn't work. As soon as I assigned a fix IP-address via my router, I was able to make the SSH connection without any issue.
My Wifi is to slow for my Pi Zero 2 W - I need to use the USB to Cat45 to get faster Internet Have you made a video ? I am using Ubuntu Studio 18.04 to set up the Pi OS. I can not get Imager to install via the install manager Can You Help ?
So, how do you establish SSH keys between host PC and the pi? I've followed guides, but haven't got it to work yet. Can only login using SSH passwords.
RPi and Laptop is in same n/w still it shows error ssh: connect to host port 22: No route to host. Then I tried to ping that ip which gave o/p Destination Host Unreachable. I've confirmed it is in the same network using airodump-ng but in nmap scan, it didn't show up. Is there any fix?
Very detailed explanation video I appreciate you for not using background music and as a beginner i learned a lot from this video. Care to explain what ssh-keygen -R 192.168........... command does?
Hello ,, i want to ask a Question ,,, what to do if my Pi is Locked with password,, so each time i power it with the File its not connected to my network
If you're using Windows you'll want to use Putty ua-cam.com/video/pWDHUlvcAsg/v-deo.html And if you're on Mac use Terminal ua-cam.com/video/SfTSBbaFN8Y/v-deo.html For creating the file around the 4 minute mark, you can also just use the file explorer to do that
When I add my WiFi and Password, and try save with the :WP I get a file that says wpa_supp.swp.... not.conf? It wont let me delete or type over the --INSERT--
terrific video - content and delivery, thanks Tony. Question: i shutdown the pi via ssh, how do i start it back up again? No keyboard, mouse, screen attached to the pi. really appreciate your help. thanks
Im having a problem, it wont connect to wifi. I have a rasbpi 3, and I followed all the steps perfectly and even tried reflashing the os. nothing helps. what am I doing wrong? edit: I think the ssh and wpa files are getting deleted from the boot directory, pls help lol
@@Sidjuhh turns out that I was just out of range, if I remember correctly. just put it next to the router, see if it helps. Also if your router is on a 5G band its more likely to be out of range
Great video Tony, very helpful. I have an issue accessing SSH, I had to make a fresh install of pi os and after that I am getting Access denied when trying to enter the password. I tried deleting the old key in known_hosts but that didn't help. The password is correct and SSH is enabled from raspi_config. any idea about this issue? thanks
@@TonyTeachesTech yup, the third try it says: Permission denied (publickey, password), although the password is correct. I can access the comand when i plug the pi to a monitor and a keyoard.
@@mokhreizat5145 perhaps your public/private key has changed or been moved? Are you in a position to reimage the Pi and start over? That's probably easiest rather than debugging. Were you ever able to login via ssh?
ping raspberrypi.local doesn't work for me. It returns "Destination net unreachable". Thus, to find the IP address of the Pi, I have to use a monitor and run ifconfig on the Pi, but that defeats the purpose of running headless. Is there another way to discover the IP address of the Pi? Sure, I know it now, but it might change if the router or Pi get reset, then I'll have to discover the new IP.
@@TonyTeachesTech Wow, I'm glad to know of this command, thanks. However, still, the RPi isn't listed there and I can still SSH into it. Luckily, it looks like the IP doesn't reset on reboot, but that still leaves the router rebooting.
50min later. Figured it out... somehow. For anyone else who might struggle with this. I just formatted and reinstalled the os until it worked. Ik it's vague, but I don't understand it either. Don't give up!!
Critical Note: The command ssh-keygen -f - is not a command which effects anything within the Rapsberry Pi (the system into which one wants to ssh) Its affect is within the Client system. In some cases this command will require higher permissions (aka operation denied) In such case add sudo to the command.
What a waste of time this was. Doesn’t work! (initially seemed like a complete waste of time but after much diligence the pointers were a helpful reference)
@@TonyTeachesTech I somehow got it working with some tinkering for hours. Thanks for the initial pointers. I did have to watch 3 other videos & combine that info to make sense of what you're doing though tbh just not as comprehensive as i needed
WARNING! THIS VIDEO IS OUTDATED BUT CAN STILL BE USED! All you have to do is add a little thing. You will add the SSH file and the wpa_supplicant.conf file just as described in the video. But after an update, it is now necessary to create a userconf.txt (just a normal textfile) and in the textfile enter this: "pi:$6$/4.VdYgDm7RJ0qM1$FwXCeQgDKkqrOU3RIRuDSKpauAbBvP11msq9X58c8Que2l1Dwq3vdJMgiZlQSbEXGaY5esVHGBNbCxKLVNqZW1" (be sure to not copy the quotes "") After that, save the userconf.txt and then also put it in the boot directory (same as you put ssh and supplicant. Now you can continue to follow the video tutorial and everything will work out great!) (IF YOU DON'T DO THIS, THEN YOU WILL GET PERMISSION DENIED WHEN YOU TRY TO ENTER "raspberry" AS THE PASSWORD!)
I am a complete noob, and i just wanna use raspberry pi for klipper on mu 3d printer. So, how can i creat ssh file on Windows 10? Can you help me, please?
If you got a "denied" error when logging in like I did, this was helpful: Recently, the default user setup of Raspbian was significantly changed, rendering most existing online tutorials invalid.
In essence, the default pi user no longer exists, so you have to create it and set its password using either the official Imager tool or by creating a userconf file in the boot partition of your microSD card, which should contain a single line of text: username:hashed-password, replacing username with the name of the user you want (e.g., pi) and hashed-password with the hash of the password you want.
thanks man ive litterally been so confused for the last four days lmao
@@Indi_DevJames even after doing that it still keeps saying wrong password (i set the user and pass to raspberry)
thank you so much, I've been searching for this answer for too long! :D
ever figure it out?@@osm4834
Same, mine still says invalid. Been searching for the answer for days and tried multiple solutions with no luck.
Calm, relaxed voice, excellent, in detail explanation... man, you are going places. Awesome content. Thank you for taking the time to create it.
I appreciate that!
I agree…‼
Thanks for emphasising the OS for headless setup. Wished I’d viewed your presentation a week ago.
Thank you. Your ssh directions were the only ones that worked for me. You rock and I subscribed for that.
Thank you so much for subscribing!
great tutorial, just here to mention that the official imager now has support to enable these without having to create these files
to add to this: hit Ctrl-Shift-S in raspberry pi imager (or hit the settings "gear" icon) to open a 'secret' menu. From there, you can enable ssh and join wifi without creating the files in this video.... but the ending is still helpful, to rename the hosts! Thanks for an awesome video Tony
I used the new image and enabled SSH and entered my WiFi credentials but I am still unable to access my pi.
Raspberry imager tool allows you to edit OS settings before writing to Micro. Create your hostname, username/password, wifi configurations, and enable ssh before writing to avoid creating the files manually.
as of 2023, you can now configure ssh via the imager settings:)
Pro tip: For whatever reasons if none of the methods are working for you. Just find a monitor for 1 time use (maybe from someone who has monitor or from computer lab). connect to monitor via hdmi. Then connect to your wifi inside raspberry os ... boom you've done what is required. From next time you can access it remotely via vnc. just set up ssh before vnc. also your laptop should be connected on same network.
This was very insightful, easy-to-follow, and appropriate for beginner/novice developers. Thank you very much for your patient and methodical instructions.
this guy is only one that could explain this correctly thanks so much
You're welcome! Subscribe for more :)
This was a great tutorial. I followed all instructions an even linked to your website. However, I getting this error: Permission denied (publickey,password). I even reset my pw to something very simple so I wouldn't mistype. I can ping the Raspberry Pi, but cannot log in via SSH. Any ideas?
i have the same problem, no matter how many times i type my password or change it to new one I always get the permission denied message, haven't got passed that point :(
I can ssh in my raspberry pi yesterday but I have pihole working is this interfering?
Thank you so much for this clear and concise tutorial.
Really helped me out today and I understood the procedure perfectly.
executed as described with a fresh installation but it shows me: permission denied
with pi@IPadress and pw: raspberry
i have the same issue.
@@pransukh8250 the solution was it doesnt worked via ssh initial. So i connected the Pi to my Monitor and my keyboard and run the configuration locally. After the first setup i hang the pi into the wireless and it worked even with ssh for me
@@Sensance Thanks for reply, what i did to resolve my issue, i just created userconf file and put USERNAME:HASHED_PASSWORD and saved it and then logged in with same credentials what i have defined in userfconf file and it worked. according to raspberry official guide lines user pi is not defined in new installation we need to do it on our own.
Very informative and easily explained! Thank you
By fate u just helped me ssh-keygen command priceless
I tried copying the files using Windows explorer, and it looked like they copied, but when I refreshed they weren't there. Note that when I installed the image, it partitioned the SD card into two drives. Is that right?
hands on the best tutorial.
the only missing part is how should I edit the with vim command ? I kept pressing all buttons till eventually it started editing. and how do you save ? ... the proper way
Lol whoops I always forget to explain this. Here's a quick video to explain ua-cam.com/video/uE4aljoMBeg/v-deo.html
I have the correct IP address and ran the ssh pi@IPADDRESS command. I tried 'raspberry' as the password but i keep getting permission denied. I have not used this raspberry pi, and have only done the things that this video said to do. Help please
Does the procedure to discover the IP address work if you have direct connection from the Raspberry Pi using an Ethernet cable to the Ethernet port on the PC ?
Great video, very clear, thnx Tony!
Following your instruction, as soon as use the ssh command line to connect to the Pi, (ssh pi@), I get this response: 'ssh: connect to host 192.168.2.230 port 22: Operation timed out'
I have set a rule for port forwarding on port 22 at my router.
Can you please advise what is wrong?
I found the issue: the DHCP assigned IP-address didn't work. As soon as I assigned a fix IP-address via my router, I was able to make the SSH connection without any issue.
in th new imager (10.2022) you can use the advanced options (small gear wheel bottom right) to set up WiFi - for SSH not sure if it's working
10/10 video help me set up my raspberry pi that I was having trouble with. New sub too
Happy to hear that. Thanks so much!
This tutorial was very helpful. Thanks a ton.
My Wifi is to slow for my Pi Zero 2 W - I need to use the USB to Cat45 to get faster Internet Have you made a video ? I am using Ubuntu Studio 18.04 to set up the Pi OS. I can not get Imager to install via the install manager Can You Help ?
No sorry
@@TonyTeachesTech Thank you for a direct answer.
So, how do you establish SSH keys between host PC and the pi?
I've followed guides, but haven't got it to work yet. Can only login using SSH passwords.
RPi and Laptop is in same n/w still it shows error ssh: connect to host port 22: No route to host. Then I tried to ping that ip which gave o/p Destination Host Unreachable. I've confirmed it is in the same network using airodump-ng but in nmap scan, it didn't show up. Is there any fix?
what can we do with the ssh? can we open a browser at ssh? can demo?
What must I do in the advanced settitng (Imager ctrl+shift+x) because it doesn't work
This was perfect! Worked fantastic
Great to hear that Stefan
How does the raspbery conects to the internet before you make the login?
Quality Content! Succinct oration with a reassuring affect :D
Great tutorial, thank you!
You're very welcome!
great tutorial
Thank you very much for the videos on this subject you have been a lifesaver.
help i cant find it on my network i have raspberry pi zero W
Very detailed explanation video
I appreciate you for not using background music and as a beginner i learned a lot from this video.
Care to explain what ssh-keygen -R 192.168........... command does?
Thanks. That will generate an ssh key for you
Hello ,, i want to ask a Question ,,, what to do if my Pi is Locked with password,, so each time i power it with the File its not connected to my network
I like how he teaches
Thanks Danny
why do you use pi@IP_ADDRESS to establish a connection? does "pi" represent the user we are using to log in?
Yes that's the default username
hi
when i write ssh pi@ and ip address mac termnial returns operation timed out how can i solve it help me guys
Thank you so much!
So I was doing well for the first 4 minutes and then along came a Terminal Window? I have no clue what that is.
If you're using Windows you'll want to use Putty ua-cam.com/video/pWDHUlvcAsg/v-deo.html
And if you're on Mac use Terminal ua-cam.com/video/SfTSBbaFN8Y/v-deo.html
For creating the file around the 4 minute mark, you can also just use the file explorer to do that
Great tutorial, thanks Tony. How to change user name and password of raspberry pi?
This should tell you exactly what you need to know ua-cam.com/video/COp6JtP45o8/v-deo.html
What if the IP address changes...Can you do a demo on how to keep the same connection whether or not the IP has expired
You can assign a static IP for the pi via your router control panel
thank you so much! but what is the difference if i connect with ethernet cable? can you explain?
You will not need to configure WiFi if connecting with ethernet. You will automatically connect this way
This is perfect ! Thank you
Now this is a super useful video. My Raspberry Pi 4 is 2gb of ram, not 4 or 8. Is that a problem?
Not a problem
Great video. Thank you
any solution to the default password not working? Bought a new kit from canakit and raspberry password is not working for me.
How do I do this one Windows?
Got it! Love this channel
Thanks!!
When I add my WiFi and Password, and try save with the :WP I get a file that says wpa_supp.swp.... not.conf? It wont let me delete or type over the --INSERT--
It should be... Esc :wq ua-cam.com/video/uE4aljoMBeg/v-deo.html
terrific video - content and delivery, thanks Tony. Question: i shutdown the pi via ssh, how do i start it back up again? No keyboard, mouse, screen attached to the pi. really appreciate your help. thanks
If you shutdown via ssh, you will need to unplug the power cord and plug it back in
Thank you so so so muchh , very helpful
You're welcome!
Im having a problem, it wont connect to wifi. I have a rasbpi 3, and I followed all the steps perfectly and even tried reflashing the os. nothing helps. what am I doing wrong? edit: I think the ssh and wpa files are getting deleted from the boot directory, pls help lol
i have the same problem
@@Sidjuhh turns out that I was just out of range, if I remember correctly. just put it next to the router, see if it helps. Also if your router is on a 5G band its more likely to be out of range
what sort of file would you use to create the ssh file if your on windows?
Same file if on Windows
no ip address is getting assigned to wlan0.how to fix this?
After typing the password it says permission denied please try again
What to do
I enabled SSH. And configured the .CONF but when I try to ping it just says unknown host
See if you have luck with the command "arp -a" to scan all IPs on your network
Great video Tony, very helpful. I have an issue accessing SSH, I had to make a fresh install of pi os and after that I am getting Access denied when trying to enter the password. I tried deleting the old key in known_hosts but that didn't help. The password is correct and SSH is enabled from raspi_config. any idea about this issue? thanks
Are you using the right user?
@@TonyTeachesTech yes, which is still Pi
@@mokhreizat5145 which is lowercase pi, right?
@@TonyTeachesTech yup, the third try it says: Permission denied (publickey, password), although the password is correct. I can access the comand when i plug the pi to a monitor and a keyoard.
@@mokhreizat5145 perhaps your public/private key has changed or been moved? Are you in a position to reimage the Pi and start over? That's probably easiest rather than debugging. Were you ever able to login via ssh?
Thank you
help, i try ssh pi@(IP) and ssh pi@raspberry but it doesn't work... it shows that error: ssh: connect to host (IP) port 22: Connection refused
I’m not sure why that would happen if you followed the steps in this video. Did you try pi@raspberry.local
Thanks alot ..its working
You're welcome!
You need to create a new vid for the updated software for Raspberry PI
how to ssh into rasberry pie that has the desktop view.
Same steps will apply
@@TonyTeachesTech Thanks I figure it out.
$50 in 2020. In 2022 it's $140.
Lol I know it sucks
It's back to 70 now
What do i have to do if the default paswoord doesnt work
how do i type in the password it is not working for me
ping raspberrypi.local doesn't work for me. It returns "Destination net unreachable". Thus, to find the IP address of the Pi, I have to use a monitor and run ifconfig on the Pi, but that defeats the purpose of running headless. Is there another way to discover the IP address of the Pi? Sure, I know it now, but it might change if the router or Pi get reset, then I'll have to discover the new IP.
The arp -a command will show all ip addresses on your network
@@TonyTeachesTech Wow, I'm glad to know of this command, thanks. However, still, the RPi isn't listed there and I can still SSH into it.
Luckily, it looks like the IP doesn't reset on reboot, but that still leaves the router rebooting.
how do do in windows
thanks
You're welcome
Help, I try pinging my Pi and it tells me, "ping: cannot resolve raspberrypi.local: unknown host"
50min later. Figured it out... somehow. For anyone else who might struggle with this. I just formatted and reinstalled the os until it worked. Ik it's vague, but I don't understand it either. Don't give up!!
Glad you figured it out
I formattet and re-installed it million times but it doesn't work. :(
wheres windows version
Does not work with Raspberry Pi5 on Windows 11.
Fuck Windows
Thank you !
You're welcome!
I’m getting an “Unknown Host” message every time I try to ping the pi?????
Maybe try to execute "arp -a" to do a device scan on your network or check your router's device list if you have access to it
Bro I get "access denied" after typing password. Can you help ?
Make sure you are providing the correct username and password and that user has SSH access
Resolved 👍
Now I am getting Non Fat Partition Error after I reboot raspberry pi everytime.
Where is the cheat sheet
you are awesome
Thanks Rudra
09:03 raspberry log in error "Nasty" solved #kalNotes
Sold me at Old Bay
Critical Note:
The command ssh-keygen -f - is not a command which effects anything within the Rapsberry Pi
(the system into which one wants to ssh)
Its affect is within the Client system.
In some cases this command will require higher permissions (aka operation denied)
In such case add sudo to the command.
bro is making us use vim
Ping raspberry pi dose not work😰
“Unkown host”
Try arp -a to scan your network for ips
My rpi4 was 149$ .....
$149 US dollars? 😱
did u buy the kit? thats prob why
Even if that was a whole kit, you overpaid.
@@trajectoryunown it could be with a ssd or a high storage micro mine was a kit that was $120 with a 32 gig microsd
I paid about the same price for mine with a 32gb so card, dunno what made me think it already had games on it
You didn't even link the shit down in the description...
FFS. ON AN EXISTING INSTALL!
pidazaz ibanii
What a waste of time this was. Doesn’t work!
(initially seemed like a complete waste of time but after much diligence the pointers were a helpful reference)
Sure it works! What problem did you run into?
@@TonyTeachesTech
8 hours later:
...
Warning: Permanently added '192.168.1.2' (ECDSA) to the list of known hosts.
ssh_dispatch_run_fatal: Connection to 192.168.1.2 port 22: Broken pipe
(base) MacBook-Pro:~ iXXXXXX$ ping raspberry.local
ping: cannot resolve raspberry.local: Unknown host
(base) MacBook-Pro:~ iXXXXXX$
@@TonyTeachesTech I somehow got it working with some tinkering for hours. Thanks for the initial pointers. I did have to watch 3 other videos & combine that info to make sense of what you're doing though tbh just not as comprehensive as i needed
@@fluxpistol3608 Sorry my video wasn't as helpful as I intended it to be. I'm happy to hear that you got it working
you noob you dont know anything
WARNING! THIS VIDEO IS OUTDATED BUT CAN STILL BE USED!
All you have to do is add a little thing. You will add the SSH file and the wpa_supplicant.conf file just as described in the video.
But after an update, it is now necessary to create a userconf.txt (just a normal textfile) and in the textfile enter this:
"pi:$6$/4.VdYgDm7RJ0qM1$FwXCeQgDKkqrOU3RIRuDSKpauAbBvP11msq9X58c8Que2l1Dwq3vdJMgiZlQSbEXGaY5esVHGBNbCxKLVNqZW1"
(be sure to not copy the quotes "")
After that, save the userconf.txt and then also put it in the boot directory (same as you put ssh and supplicant. Now you can continue to follow the video tutorial and everything will work out great!)
(IF YOU DON'T DO THIS, THEN YOU WILL GET PERMISSION DENIED WHEN YOU TRY TO ENTER "raspberry" AS THE PASSWORD!)
I am a complete noob, and i just wanna use raspberry pi for klipper on mu 3d printer. So, how can i creat ssh file on Windows 10?
Can you help me, please?
Another doubt is about your .txt file, i change the username and password, so i wanna edit your recommendetion text file?
It's working
thank you so much!