Setting Up SSH Keys

  Переглядів 40,373

Nerd on the Street

Nerd on the Street

4 роки тому

Are you still using passwords for your SSH sessions? Here's a quick tutorial for increasing your security by setting up key-based authentication instead.
---
Join the Nerd Club: nerdclub.nots.co
nerdonthestreet.com
discord.nots.co
/ nerdonthestreet
/ nerdonthestreet
/ nots_network
E-Mail: jacob@nerdonthestreet.com

КОМЕНТАРІ: 31
@Borsting89
@Borsting89 4 роки тому
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.
@TheKeule33
@TheKeule33 4 роки тому
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/
@paulcodes
@paulcodes 3 роки тому
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!
@davids9139
@davids9139 Рік тому
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!
@vincentlaw1016
@vincentlaw1016 4 роки тому
Your videos are very informative and easy to understand for linux noobs like myself thanks for posting this.
@merkin3k
@merkin3k 4 роки тому
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. 👍
@deannalipowicz2862
@deannalipowicz2862 2 роки тому
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.
@mrherpes2971
@mrherpes2971 3 роки тому
thank you very much, finally after so many years, ssh concept has been made clear!
@martymccafferty7510
@martymccafferty7510 4 роки тому
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.
@ProgrammingwithPeter
@ProgrammingwithPeter 4 роки тому
This is important and useful if you have to do it a lot, in general it's a good practice to use ssh
@rcdenis1
@rcdenis1 4 роки тому
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.
@mrherpes2971
@mrherpes2971 3 роки тому
yeah this simple analogy made this concept so simple to understand.
@EnglishRain
@EnglishRain 2 роки тому
Excellent tutorial, thank you so much!
@daniellevitski6703
@daniellevitski6703 Рік тому
Respect!! One of the best tutorials!
@hakkadesu1322
@hakkadesu1322 Рік тому
Incredibly well explained, thank you very much.
@martymccafferty7510
@martymccafferty7510 4 роки тому
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.
@JNET_Reloaded
@JNET_Reloaded 2 роки тому
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!
@jayleeh65
@jayleeh65 3 роки тому
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?
@mariadeclaret540
@mariadeclaret540 Рік тому
Hello, I generated ssh key but I cant find where it is saved, thus unable to log in to the server
@wolfganggosejacob779
@wolfganggosejacob779 3 роки тому
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?
@NerdOnTheStreet
@NerdOnTheStreet 3 роки тому
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.
@wolfganggosejacob779
@wolfganggosejacob779 3 роки тому
@@NerdOnTheStreet thank you for explaining the difference. so i can look for the length
@m4l490n
@m4l490n 4 роки тому
Why are you going to change your file run for nextcloud?
@NerdOnTheStreet
@NerdOnTheStreet 4 роки тому
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.
@lechsiz1642
@lechsiz1642 2 роки тому
@@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.
@user-kv3nt7fc8s
@user-kv3nt7fc8s 5 місяців тому
ssh not working, pleaase help me .. /root/.ssh/config: line 2: Bad configuration option: username
@eliashckr4913
@eliashckr4913 4 роки тому
I want to translate your video, enable the translator option in the video
@Itronyx1cz
@Itronyx1cz Рік тому
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.
@NerdOnTheStreet
@NerdOnTheStreet Рік тому
"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.
@chessgo5028
@chessgo5028 5 місяців тому
Man it is too technical. I was looking for simpler explanation. dislike.
SSH Keys
10:12
RobEdwards
Переглядів 95 тис.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Переглядів 28 млн
How SSH Works
8:54
Mental Outlaw
Переглядів 450 тис.
Setting Up SSH Keys for GitHub
10:43
Victor Geislinger
Переглядів 161 тис.
SSH Tunneling Explained
6:37
Tinkernut
Переглядів 461 тис.
How to know if your PC is hacked? Suspicious Network Activity 101
10:19
The PC Security Channel
Переглядів 1 млн
Kali Linux Quick Tips - How To Setup SSH On Kali
7:26
HackerSploit
Переглядів 61 тис.
Best OS for programming? Mac vs Windows vs Linux debate settled
8:41
Generate SSH keys for Windows -  Secure Shell Easy Way
6:30
williamsk
Переглядів 23 тис.
Cybersecurity for Beginners: How to use Wireshark
9:29
The PC Security Channel
Переглядів 82 тис.
Airpods’un Gizli Özelliği mi var?
0:14
Safak Novruz
Переглядів 1,1 млн
APPLE УБИЛА ЕГО - iMac 27 5K
19:34
ЗЕ МАККЕРС
Переглядів 52 тис.
НЕ ПОКУПАЙТЕ НОВЫЙ СМАРТФОН, ПОКА НЕ ВЫШЕЛ ЭТОТ [2024]
13:25
Thebox - о технике и гаджетах
Переглядів 87 тис.
Creepy Samsung Alarm cannot be turned off 😱🤣 #shorts
0:14
Adani Family
Переглядів 1,2 млн
How Neuralink Works 🧠
0:28
Zack D. Films
Переглядів 25 млн