Thank you. For new users like me: when trying to login after the key setup is complete, make sure to login as the same user you setup the keys with. He mentions this, but I was an idiot and tried to login as root. Explanation: SSH looks for the key in the users directory /home/USER/.ssh/. When you are root, you use a different home directory, and therefore a different path to ~/.ssh, because roots home is /root/.ssh/
This is great, thanks for sharing Jacob. I`ve actually been using key authentication for quite a while now since its required for rsync automated backup. For any of you guys watching, key based authentication not only let you secure your server at a higher level, but it is also necessary if you want to run a scheduled cronjob with backup using rsync. It allows for a fully encrypted, very robust backup over the network/internet. Maybe that would be a great follow up video for you, Jacob? And btw, 3:12 is one of the reasons I love this channel.
Thank you for finally explaining what a key is. I literally watched several videos and nobody actually explains the difference between this and a password the way you did.
Glad to see you using ssh keys now. Keys can also be assigned commands on remote sever, and not just the bash shell. I use this so my admins can see results of a command. Of couse sshfs is another magical tool to use with ssh to mount a share over ssh. There is lots of magic that can be done with ssh.
Great video! Out of all the videos on the internet, this one helped the most with setting up keys and understanding the finer details. I really appreciate you taking the time to make this video. Thanks Jacob!
Thanks for doing that extra step and configuring access from a second client. That cleared up something for me that I was just trying to work through last night. 👍
Dude this was perfect! Thanks for going through all of the details. It finally clicked for me thanks for your talking through the thought process as well as each step. Thanks for putting this together! Keep it up!
Public/private keys made sense to me when someone suggested I think of a lock and its key. The public key is the lock on the server's gate and the private key is my key to open the lock so i can get in. Simple concept. Thanks for the video.
With Ssh-agent you will only have to type your passphrase once and you will not get prompted again for that key when you ssh again, until you logout of your desktop session, which would end the ssh-agent session.
What if my server is not configured for password authentication and only requires an ssh key authentication? How would I be able to ssh copy the key from my local machine to the remote server without doing the manual copy paste format?
om on a rpi4 running raspbian os for arm and 3cx is onit all working, now i want to put that all as is onto a vmware, the stand alone refuses to connect i tried all kinds root account normal account thats added to sudoers file tried all kinds of ssh keys and nothing connects any ideas? can i just image the sd card and give that img file to vmware and it just work? i thought i could just add the public ssh key from w.e the vmware stand alone crap uses to auth hosts file but i dont know where to find the pubolic key for my windows i can generate 1 but not sure if that works i did try but it failed!
a mathematical question: can i change the private key and the public key before first usage by changing the filenames? result is that i spread my "private key" and save my "public key". the function and security should be the same! or not?
The private key and public key use different formats (and the private key is larger.) While it might be acceptable from a security standpoint in some scenarios, I wouldn't expect it to work in practice with most software. There are several good Stack Exchange answers about this if you do a web search for your question.
Because Nextcloud is open-source. I'm actually not a fan of the Nextcloud developers (they tend to think they "know what's best" for their users), but Filerun being proprietary makes it a stain for me, as well as it works.
@@NerdOnTheStreet How safe is it for me to store a copy of my private SHH key on nextcloud if I use a provider? I rent a room in a house with 2 other roommates and if my PCs/gear were ever stolen, I'd lose the key. granted, my server is a Pi4, so that might get stolen, too. That is one reason I don't want my own Nextcloud on my own server.
I really don't know what to say, for me the tutorial is complicated, plus I don't understand one thing at 10:50 what is this supposed to be? Entering via root? And also some ip that you didn't even say if it belongs to the server or to the computer it owns. And another thing is that for me it says it found no ERROR No such file? Like doesn't it generate it rather than like search? What is this terminal behavior? All the procedures I tried to do according to the video and I have no other option but to give up and use another server instead of SSH because I really can't do it any other way.
"at 10:50 what is this supposed to be? Entering via root?" - Yes, that moment is logging into the root account of a server that is still configured with password-based authentication. "you didn't even say if it belongs to the server or to the computer it owns." - Servers do not "own" computers. I don't know where you got that idea, because it wasn't from this video. You can also deduce that if I'm on a client computer and I'm SSH'ing into something, it's not the client computer... because why would I SSH into the computer that I'm already on? "it found no ERROR No such file?" - It seems like you messed up the formation of this sentence, but you provided an incorrect filename or path to a command if you're seeing that message. If you're sure that the file path is correct, then you may be running a command meant for the client on the server (or vice versa). "All the procedures I tried to do according to the video" - You most certainly did not do the procedures according to the video if it's not working. This is a very basic process that doesn't change much between distros or over time. "I have no other option but to give up and use another server instead of SSH" - You're going to throw away a physical server because you can't log in with SSH? Or do you mean "use another authentication mechanism," like a password? SSH is extremely common and there are many resources about how to set it up, so please do not insinuate that your failure to follow my tutorial means that I have deprived you of the ability to use a server.
Thank you.
For new users like me: when trying to login after the key setup is complete, make sure to login as the same user you setup the keys with. He mentions this, but I was an idiot and tried to login as root.
Explanation: SSH looks for the key in the users directory /home/USER/.ssh/. When you are root, you use a different home directory, and therefore a different path to ~/.ssh, because roots home is /root/.ssh/
This is great, thanks for sharing Jacob. I`ve actually been using key authentication for quite a while now since its required for rsync automated backup. For any of you guys watching, key based authentication not only let you secure your server at a higher level, but it is also necessary if you want to run a scheduled cronjob with backup using rsync. It allows for a fully encrypted, very robust backup over the network/internet. Maybe that would be a great follow up video for you, Jacob? And btw, 3:12 is one of the reasons I love this channel.
Thank you for finally explaining what a key is. I literally watched several videos and nobody actually explains the difference between this and a password the way you did.
Glad to see you using ssh keys now. Keys can also be assigned commands on remote sever, and not just the bash shell. I use this so my admins can see results of a command.
Of couse sshfs is another magical tool to use with ssh to mount a share over ssh.
There is lots of magic that can be done with ssh.
Great video! Out of all the videos on the internet, this one helped the most with setting up keys and understanding the finer details. I really appreciate you taking the time to make this video. Thanks Jacob!
Thanks for doing that extra step and configuring access from a second client. That cleared up something for me that I was just trying to work through last night. 👍
Dude this was perfect! Thanks for going through all of the details. It finally clicked for me thanks for your talking through the thought process as well as each step. Thanks for putting this together! Keep it up!
Public/private keys made sense to me when someone suggested I think of a lock and its key. The public key is the lock on the server's gate and the private key is my key to open the lock so i can get in. Simple concept. Thanks for the video.
yeah this simple analogy made this concept so simple to understand.
This is important and useful if you have to do it a lot, in general it's a good practice to use ssh
Your videos are very informative and easy to understand for linux noobs like myself thanks for posting this.
With Ssh-agent you will only have to type your passphrase once and you will not get prompted again for that key when you ssh again, until you logout of your desktop session, which would end the ssh-agent session.
Respect!! One of the best tutorials!
Incredibly well explained, thank you very much.
What if my server is not configured for password authentication and only requires an ssh key authentication? How would I be able to ssh copy the key from my local machine to the remote server without doing the manual copy paste format?
Excellent tutorial, thank you so much!
om on a rpi4 running raspbian os for arm and 3cx is onit all working, now i want to put that all as is onto a vmware, the stand alone refuses to connect i tried all kinds root account normal account thats added to sudoers file tried all kinds of ssh keys and nothing connects any ideas? can i just image the sd card and give that img file to vmware and it just work? i thought i could just add the public ssh key from w.e the vmware stand alone crap uses to auth hosts file but i dont know where to find the pubolic key for my windows i can generate 1 but not sure if that works i did try but it failed!
Hello, I generated ssh key but I cant find where it is saved, thus unable to log in to the server
ssh not working, pleaase help me ..
/root/.ssh/config: line 2: Bad configuration option: username
a mathematical question: can i change the private key and the public key before first usage by changing the filenames? result is that i spread my "private key" and save my "public key".
the function and security should be the same! or not?
The private key and public key use different formats (and the private key is larger.) While it might be acceptable from a security standpoint in some scenarios, I wouldn't expect it to work in practice with most software. There are several good Stack Exchange answers about this if you do a web search for your question.
@@NerdOnTheStreet thank you for explaining the difference. so i can look for the length
I want to translate your video, enable the translator option in the video
Why are you going to change your file run for nextcloud?
Because Nextcloud is open-source. I'm actually not a fan of the Nextcloud developers (they tend to think they "know what's best" for their users), but Filerun being proprietary makes it a stain for me, as well as it works.
@@NerdOnTheStreet How safe is it for me to store a copy of my private SHH key on nextcloud if I use a provider? I rent a room in a house with 2 other roommates and if my PCs/gear were ever stolen, I'd lose the key. granted, my server is a Pi4, so that might get stolen, too. That is one reason I don't want my own Nextcloud on my own server.
I really don't know what to say, for me the tutorial is complicated, plus I don't understand one thing at 10:50 what is this supposed to be? Entering via root? And also some ip that you didn't even say if it belongs to the server or to the computer it owns. And another thing is that for me it says it found no ERROR No such file? Like doesn't it generate it rather than like search? What is this terminal behavior? All the procedures I tried to do according to the video and I have no other option but to give up and use another server instead of SSH because I really can't do it any other way.
"at 10:50 what is this supposed to be? Entering via root?" - Yes, that moment is logging into the root account of a server that is still configured with password-based authentication.
"you didn't even say if it belongs to the server or to the computer it owns." - Servers do not "own" computers. I don't know where you got that idea, because it wasn't from this video. You can also deduce that if I'm on a client computer and I'm SSH'ing into something, it's not the client computer... because why would I SSH into the computer that I'm already on?
"it found no ERROR No such file?" - It seems like you messed up the formation of this sentence, but you provided an incorrect filename or path to a command if you're seeing that message. If you're sure that the file path is correct, then you may be running a command meant for the client on the server (or vice versa).
"All the procedures I tried to do according to the video" - You most certainly did not do the procedures according to the video if it's not working. This is a very basic process that doesn't change much between distros or over time.
"I have no other option but to give up and use another server instead of SSH" - You're going to throw away a physical server because you can't log in with SSH? Or do you mean "use another authentication mechanism," like a password? SSH is extremely common and there are many resources about how to set it up, so please do not insinuate that your failure to follow my tutorial means that I have deprived you of the ability to use a server.
Man it is too technical. I was looking for simpler explanation. dislike.