Good walkthrough, but it'd be worth mentioning that if you do add a passphrase for the ssh, you will be promted that for each log in. So in that case you are just making your logon more secure (ssh key+password), but you will still need a password for each login. You can however change or remove it with the ssh-keygen -p command.
Really liked that you explained what these commands and settings do, that helped alot. :) . I have watched other videos befor I came to this one, and noone else did a job as good as you. The only thing I was missing is maybe explaining why someone would want to use a passphrase / what it does. And how to deaktivate PasswordAuthentication on the pi. Still a really good video. Just what I needed!
Me again with another question/problem: I opened up my Windows Command prompt to follow along and when I entered "ssh-copy-id etc..." I got the error that "ssh-copy-id" is not recognized as an internal or external command. Again, if you have any guidance, it is much appreciated.
You might have to manually copy the contents of the public key file and paste it into ~/.ssh/authorized_keys on the raspberry pi. There's some instructions on how to do that here: askubuntu.com/questions/644478/i-dont-have-the-ssh-copy-id-command-windows-client
@@SamMeechWard thank you again! That fixed the issue (before I ran into some other issues, but I think it's my fault for messing up the default user's permissions). I'll be starting from scratch again tomorrow 😅 I appreciate the guidance. Your videos have been very clear and helpful.
Im having touble I did all the steps but on the last one, it keeps requesting me to enter a password even after I made the config file. I then disabled password authentication so now it just says permission denied. (I am on windows) I think its a problem with the config file but I'm not sure what to fix because I do not want to add the extra file path everytime I want to ssh into my pi
It works for my laptop, but my main computer can log into my pi without the key.. hm.. It seems I've only raised the security if the attacker was coming in from my own laptop lol. Shouldnt my pi be requiring the private key?
How I solved: sudo vim /etc/ssh/sshd_config replace: #PasswordAuthentication yes with: PasswordAuthentication no then reboot the pi. THEN, I repeated the process given in the video, on my computer. Making a separate key for each computer you want to remote ssh into the pi.
Hi Sam! Thanks for the great video. I am planning to do parallel SSH to 5 pi's that i have to run a python script. Does it mean that i have to create SSH key for each of the pi I have before running PSSH? thanks!
Great video Thanks heaps Only problem I found is Windows 10 doesn't have a 'ssh-copy-id' command available but it's no bother to open the public file in a text editor and copy it to a raspberry pi
can you create video how to put ssh key while no access to pi with 64 bit OS, for me when I use pi imager with 32 bit and preset password it works. But 64 bit always access denied. I assume there is issue with 64 bit. So Probably it can resolved if we can preload ssh key on 64 bit os directly modify sdcard boot system.
Hi Sam! That's really an awesome explanation. However, there is one little flaw: When you generate the ssh key in your folder, you do that with "sudo" right. That's why the regular ssh will fail. That means, you cannot really call the pi by calling "ssh pi@123.456.789", you need to do that with "sudo ssh pi@123.456.789". ... Do you have a hint on how to simplify that?
@@SamMeechWard Hi Sam! Thank you very much for the hint. You are correct. You MUST NOT generate the ssh-key with sudo rights. ... Same applies for the config file. Your solution works only if done with the privileges of the current user on the machine. Thanks!
2.5 hrs later....... the whole ssh-copy-id just didnt work for me just had to ctrl Z. tried to ssh intp the Pi and for some reason its now working oh the ZX81 days where sooo much easier ....
Cannot tell you how great this was. Just the perfect amount of detail, not too much. Got straight to the point!
Good walkthrough, but it'd be worth mentioning that if you do add a passphrase for the ssh, you will be promted that for each log in. So in that case you are just making your logon more secure (ssh key+password), but you will still need a password for each login. You can however change or remove it with the ssh-keygen -p command.
Really liked that you explained what these commands and settings do, that helped alot. :) . I have watched other videos befor I came to this one, and noone else did a job as good as you.
The only thing I was missing is maybe explaining why someone would want to use a passphrase / what it does. And how to deaktivate PasswordAuthentication on the pi.
Still a really good video. Just what I needed!
This whole miniseries was great... thanks!
Helped me out tremendously as I was stuck and frustrated.
SSH has given me so much trouble for a while
Me again with another question/problem: I opened up my Windows Command prompt to follow along and when I entered "ssh-copy-id etc..." I got the error that "ssh-copy-id" is not recognized as an internal or external command. Again, if you have any guidance, it is much appreciated.
You might have to manually copy the contents of the public key file and paste it into ~/.ssh/authorized_keys on the raspberry pi. There's some instructions on how to do that here: askubuntu.com/questions/644478/i-dont-have-the-ssh-copy-id-command-windows-client
@@SamMeechWard thank you again! That fixed the issue (before I ran into some other issues, but I think it's my fault for messing up the default user's permissions). I'll be starting from scratch again tomorrow 😅 I appreciate the guidance. Your videos have been very clear and helpful.
@@ayelaii would scp work and in that case, do i just store the public key in the .ssh folder ?
Im having touble I did all the steps but on the last one, it keeps requesting me to enter a password even after I made the config file. I then disabled password authentication so now it just says permission denied. (I am on windows) I think its a problem with the config file but I'm not sure what to fix because I do not want to add the extra file path everytime I want to ssh into my pi
'ssh-copy-id' is not recognized as an internal or external command. This doesn't work on windows
Thank you
It works for my laptop, but my main computer can log into my pi without the key.. hm.. It seems I've only raised the security if the attacker was coming in from my own laptop lol.
Shouldnt my pi be requiring the private key?
How I solved:
sudo vim /etc/ssh/sshd_config
replace:
#PasswordAuthentication yes
with:
PasswordAuthentication no
then reboot the pi.
THEN, I repeated the process given in the video, on my computer. Making a separate key for each computer you want to remote ssh into the pi.
Hi Sam! Thanks for the great video. I am planning to do parallel SSH to 5 pi's that i have to run a python script. Does it mean that i have to create SSH key for each of the pi I have before running PSSH? thanks!
Hello, is that preventing a hacker or a bot to open ssh with username and password?
Great video Thanks heaps
Only problem I found is Windows 10 doesn't have a 'ssh-copy-id' command available but it's no bother to open the public file in a text editor and copy it to a raspberry pi
hiw did you do this
can you create video how to put ssh key while no access to pi with 64 bit OS, for me when I use pi imager with 32 bit and preset password it works. But 64 bit always access denied. I assume there is issue with 64 bit. So Probably it can resolved if we can preload ssh key on 64 bit os directly modify sdcard boot system.
Hi Sam! That's really an awesome explanation. However, there is one little flaw: When you generate the ssh key in your folder, you do that with "sudo" right. That's why the regular ssh will fail. That means, you cannot really call the pi by calling "ssh pi@123.456.789", you need to do that with "sudo ssh pi@123.456.789". ... Do you have a hint on how to simplify that?
Are you talking about when generate the key using ssh-keygen? That should be done without using sudo.
@@SamMeechWard Hi Sam! Thank you very much for the hint. You are correct. You MUST NOT generate the ssh-key with sudo rights. ... Same applies for the config file. Your solution works only if done with the privileges of the current user on the machine. Thanks!
Thankyousomuch! you put me out of misery thnks!!!
Oops Sorry I should have read previous comments :-)
2.5 hrs later....... the whole ssh-copy-id just didnt work for me just had to ctrl Z. tried to ssh intp the Pi and for some reason its now working oh the ZX81 days where sooo much easier ....
s3.amazonaws.com/rails-camp-tutorials/blog/programming+memes/works-doesnt-work.jpg
How to add Authenticate to ubs in pi ?!
this does not work in windows 10
Hello, do you have paid developer services? If there is, can you send the email?
This does not work on windows