Linux/Mac Tutorial: SSH Key-Based Authentication - How to SSH Without a Password

  Рет қаралды 315,893

Corey Schafer

Corey Schafer

6 жыл бұрын

In this Linux/Mac terminal tutorial, we will be learning how to configure ssh keys so that we can login to our servers without a password. Not only is this more convenient, but it is also more secure. This also allows us to write automated scripts to talk to our servers without the need of putting in passwords constantly. Let's get started.
How to Create a Network of Machines in VirtualBox with SSH Access:
• How to Create a Networ...
✅ Support My Channel Through Patreon:
/ coreyms
✅ Become a Channel Member:
/ @coreyms
✅ One-Time Contribution Through PayPal:
goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - / coreymschafer
Facebook - / coreymschafer
Twitter - / coreymschafer
Instagram - / coreymschafer
#Linux #Mac

Пікірлер: 257
@kalyanhr
@kalyanhr 5 жыл бұрын
Simple, Clear and Short video about SSH. Just just nailed it. Awesome job!!
@coderoam
@coderoam 6 жыл бұрын
Well Explained. As a developer, it was bit difficult to understand others tutorial. Keep up the good work.
@IcarianVX
@IcarianVX 4 жыл бұрын
FINALLY - I have been messing with opening a dynamic tunnel from a linux machine TO a Mac for hours now. This tutorial (while backwards) was what I needed. Thanks Corey.
@randmssolutions9013
@randmssolutions9013 2 жыл бұрын
As always, Corey explained the usage in a manner that is easily understood. I was stumped by the official SSH documentation because it doesn't clearly indicate which machine to copy the public key over to. Thank you Corey.
@AndyDavis007
@AndyDavis007 4 жыл бұрын
Hey, Corey. I've used a couple of your tutorials so far. I set up (2) virtual Ubuntu-18.04 servers in VirtualBox on a host network with ssh keys login only. Since my host laptop is Ubuntu I do have the ssh-copy-id command but I'm glad you showed the "manual" way of configuring it too. Thanks again.
@baldmike
@baldmike 6 жыл бұрын
This one's the winner! Great video, very helpful, thank you.
@bcross9109
@bcross9109 6 жыл бұрын
Thanks for this video, way more practical and informative than the others I found!
@erickmwazonga8871
@erickmwazonga8871 6 жыл бұрын
A clear and detailed explanation for a beginner and a clarification guide for a guru. Thank you.
@mattiylen
@mattiylen 3 жыл бұрын
Genuinely, very clear demonstration, rarely one can find as perfect as this
@chetansharma5514
@chetansharma5514 4 жыл бұрын
You have this special quality to explain things with simplicity.. Be it git or linux or python. I just enjoy your videos. A massive yes to your videos because you show hands on and not just theory. Awesome beyond Awesomeness
@m22d52
@m22d52 2 жыл бұрын
because he does not know himself
@w.schobel1514
@w.schobel1514 6 жыл бұрын
As always: Perfect explained. Great vid !
@ayan1386
@ayan1386 4 жыл бұрын
Amazing tutorial. Concise and to-the-point!
@kjm2002
@kjm2002 Жыл бұрын
The quality and execution of this is so spot on to a tee - even 5 years old, this is golden content, thank you so much!
@muijnckj
@muijnckj 6 жыл бұрын
Finally a simple tutorial, it's not all that hard you know... Thank you!!
@rajeevsuraneni8805
@rajeevsuraneni8805 5 жыл бұрын
Thank you! This is by far the cleanest explanation
@geoptus
@geoptus 5 жыл бұрын
This is by far the best and clearest explanation of how to implement k-b-a. I have used keys for a while but never fully understood the details. Thanks for this great tutorial Corey
@Vegetableswithpants
@Vegetableswithpants Жыл бұрын
Thank you for this video! The way you explained the pub key process finally clicked with me, after I spent yesterday reading documentation and getting it wrong.
@skyhackerfpv7104
@skyhackerfpv7104 2 жыл бұрын
Yes! It makes sense to me now. Public key goes on the remote server in the authorized_keys file, it was so helpful to see this being done. THANK YOU!
@pauloferreira4040
@pauloferreira4040 4 ай бұрын
Extremely clean and direct information. This soluton worked for me at the first trial! Thanks for taking the time to do this video.
@hophmanbg
@hophmanbg 5 жыл бұрын
You just put the light in my head thanks man and all the best.
@rafaeltravecedo7905
@rafaeltravecedo7905 5 жыл бұрын
Thanks a lot. Your explanation about using SSH-KEYS is very clear.
@BlancheNuit
@BlancheNuit Жыл бұрын
I''ve looked 4-5 videos on how to do that, maybe I'm dumb asf but none helped me. Your video was crystal clear and it instantly worked, thanks
@zax71
@zax71 2 жыл бұрын
Great tuturial! Works on Windows to Linux too. If you use powershell the commands will be the same, just you have to type out your home directory manually when doing the scp instead of ~
@higiniofuentes2551
@higiniofuentes2551 2 жыл бұрын
Good video! Sometimes I didn't know I you were in the remote or in the main, but the information is accurate! Thank you!
@Appalling68
@Appalling68 2 жыл бұрын
Just stumbled upon this video. Nicely done and perfectly explained. Thank you.
@Clem000
@Clem000 3 жыл бұрын
Thanks this was really handy for me. I am using tunneling and had to ensure that both the public key for my personal machine and the tunnel were (concatentated) in the authorized_keys file.
@mamusthafa6
@mamusthafa6 3 жыл бұрын
Short and sweet. I understood very clearly. awesome teacher. Waiting for more videos like this...
@kimgeen8002
@kimgeen8002 2 жыл бұрын
Thank you so much for this tutorial! Simple and well explained with all neccecary details!
@rmcellig
@rmcellig 4 жыл бұрын
Excellent. Exactly what I was looking for!!
@DannyDaDane
@DannyDaDane Жыл бұрын
The way I remember is that the public key is like the lock on the door that everyone can try their private keys on, but only your private key will actually open the lock. Copying the Public key is just installing the lock on the door on the server, that only your private key can open. Great video btw!
@csabajozsef8400
@csabajozsef8400 5 жыл бұрын
Thanks for the quality videos, this is a very good place to learn.
@portfedh
@portfedh 2 жыл бұрын
I keep finding your videos. They are are so good. Thank you.
@leopet6815
@leopet6815 3 жыл бұрын
Very concise info that is applicable to any server. Thank you!
@Raqueem
@Raqueem 2 жыл бұрын
Thank you for the excellent tutorial and clear articulation ! loved it !
@ohtobetiramisu
@ohtobetiramisu Жыл бұрын
Holy shit thank you, I was trying to ssh into my ubuntu server through windows 11 and I knew it was way simpler than I was putting it out to be. Great and easy tutorial :)
@matteocassino3172
@matteocassino3172 2 жыл бұрын
Exactly what I was searching for. Thx a lot for the good job.
@anandmurugan3804
@anandmurugan3804 4 жыл бұрын
Thanks You So Much For This Video.. Its really helped me a lot in understanding of SSH key based authentication
@claudiom07
@claudiom07 3 жыл бұрын
Corey... you saved my life!! Thank you for your clear explanation!
@AdrianMoseley
@AdrianMoseley 3 жыл бұрын
Excellent tutorial. I can now add this to my toolbelt.
@elpedrooo2008
@elpedrooo2008 5 жыл бұрын
Thank You , It was A clear Explanation
@niraj874u
@niraj874u 5 жыл бұрын
Thank you so much. Nice Explanation.
@arifsali
@arifsali 6 жыл бұрын
Awesome explanation (you are gifted). Looking at things from multiple server's perspective, I have yet to dwell deep into maintenance aspect of keys. How is one server's private key on your machine, separate from another server's private key? Do all of them show up with the same name but different hash content inside the file? I also wonder how could one know which key belongs to which server (if you have to do it again in the future). Is this something one has to maintain (by labeling, separating into different folders etc)? Also, what is the best practice if as a server admin, you have to do it for end-users who may not be CLI/Linux proficient?
@juancarlosrojas5858
@juancarlosrojas5858 Жыл бұрын
Gracias. Muy bien, excelente. Me aclaraste mucho. En Windows también se debe usar scp para copiar el archivo de la llave pública a la máquina remota.
@rullywow3834
@rullywow3834 5 жыл бұрын
Great video and clear explanation. Thanks!
@RCMOULI1
@RCMOULI1 5 жыл бұрын
Easily explained. Keep adding more :)
@seungwoochoe
@seungwoochoe 2 жыл бұрын
Wow, this was really helpful. Thank you!!
@rueliotube
@rueliotube 3 жыл бұрын
Excellent video! Thanks for taking the time to educate me.
@drego05
@drego05 4 жыл бұрын
Excellent videos and tutorials Corey-- I've watched a ton of videos on the same subject matter and content and yours is hands down, the best I've come across. I did have one question, if you get a sec--- what did you have to setup script wise to that you see available software updates and security updates when login? I'm sure I could Google it, but since I'm here anyway I thought I'd ask.
@coreyms
@coreyms 4 жыл бұрын
Hey there. Those were new installs of Ubuntu, so I didn't set up anything that I know of. I believe that may just be the default behavior.
@tommygunn2782
@tommygunn2782 Жыл бұрын
Wow, you are an amazing instructor!
@victorespinoza355
@victorespinoza355 3 жыл бұрын
Thanks for these wonderful tutorials Corey. I hope you keep receiving blessings, lots of blessings
@anisdhouieb9918
@anisdhouieb9918 5 жыл бұрын
very good exaplanation in just 15 minutes
@smudgepost
@smudgepost 4 жыл бұрын
Thank you! I've struggled with this for so long and this covers all variations so well, thanks!
@magnusmorgens5966
@magnusmorgens5966 5 жыл бұрын
Awesome now i got a safe way to enter my raspberry via pc and mobil thank you
@blogcorpo
@blogcorpo Жыл бұрын
5 years and still amazing. ♥
@satyareddy7728
@satyareddy7728 5 жыл бұрын
Well Explained on Key based authentication
@cyberofthinx
@cyberofthinx Жыл бұрын
Great video great simple explanation! It made my day, many thanks!
@Sledy95
@Sledy95 2 жыл бұрын
Great video. Pearl in the sea of confusing tutorials :D
@surajoberai
@surajoberai Жыл бұрын
thank you. I have successfully set up key-based authentication on the remote server
@riadhtroudi295
@riadhtroudi295 4 жыл бұрын
very well explained, thank you very much for your time.
@elliottmiller2052
@elliottmiller2052 5 жыл бұрын
I've been having difficulty using Python to connect to a MySQL database via SSH. I would love for you to do a video on that.
@Andrei-ds8qv
@Andrei-ds8qv 5 жыл бұрын
Very clear, very good explanation, thanks
@supalarry1009
@supalarry1009 5 жыл бұрын
Amazing video Corey! Thank you very much :))
@iamp1991
@iamp1991 Жыл бұрын
Thank you sir. That was clear & very useful.
@Ninja-iq2xt
@Ninja-iq2xt 6 жыл бұрын
Nice one Corey. Can you make tutorial on pipeline @corey? As its something which very few knows and very few videos on it explaining it, we will love your quality videos on it.
@tejaseervi1151
@tejaseervi1151 2 жыл бұрын
Wow... Great explanation... As always in other videos.
@kareemjeiroudi1964
@kareemjeiroudi1964 5 жыл бұрын
Man, you're a goddamn good teacher 👍!
@GustavAgar
@GustavAgar 4 ай бұрын
a video about ssh port forwarding of you would be legendary !!
@pierrecanisiuspaxsonessouk2434
@pierrecanisiuspaxsonessouk2434 Жыл бұрын
Very clear explanations, thanks so much
@jtrtsay
@jtrtsay Жыл бұрын
wow you are so amazing at keeping things easy to follow, successfull first try!
@uajoku
@uajoku Жыл бұрын
Nicely explained. Thank you.
@hubercats
@hubercats 3 жыл бұрын
Very helpful post. Thank you!
@Babe_Chinwendum
@Babe_Chinwendum Жыл бұрын
It was very useful to me. Thank you so much.
@siamakshams1923
@siamakshams1923 3 жыл бұрын
Great tutorial Corey, thank you.
@nidhipatel133
@nidhipatel133 3 жыл бұрын
This is the best video. Thank you so much for this.
@garryn123
@garryn123 3 жыл бұрын
clear and concise...excellent!!!
@navneetsingh285
@navneetsingh285 3 жыл бұрын
great explanation...so simple
@maclanphere5674
@maclanphere5674 4 жыл бұрын
excellent, thanks Corey. I'm guessing there is no issue with renaming these priv/pub key files after creation?
@lucienmauricesenghor8216
@lucienmauricesenghor8216 Жыл бұрын
I was waiting for this
@kalashshrma7265
@kalashshrma7265 5 жыл бұрын
awesome, best explanation like always.
@vamsikrishna1131
@vamsikrishna1131 5 жыл бұрын
excellent. precise and to the point..
@fata__morgana
@fata__morgana 4 жыл бұрын
Excellent tutorial!
@subhankarb100
@subhankarb100 Жыл бұрын
really appreciated your video ....very helpful
@EdwinRombouts
@EdwinRombouts 2 жыл бұрын
Awesome tutorial, thanks a lot!
@iliasalqassar1489
@iliasalqassar1489 4 жыл бұрын
Well Explained. Thx a lot !
@bruceadam1772
@bruceadam1772 Жыл бұрын
what a good video!!! well explained
@mikedan8972
@mikedan8972 2 жыл бұрын
well explained, thank you!
@metamototomo
@metamototomo 2 жыл бұрын
That's amzaing tutorial. Thank you so much!
@antoinemercier82
@antoinemercier82 5 жыл бұрын
Hey Corey, it looks like this video isn't in the "Linux/Max Tutorials" playlist, so it was not obvious for me to find. So I would suggest you add it to that playlist. Thanks!
@coreyms
@coreyms 5 жыл бұрын
Oh, I must have missed that. Just added it. Thanks!
@jingyuanhu9804
@jingyuanhu9804 4 жыл бұрын
This is the best tutorial ever
@brokenbe
@brokenbe Жыл бұрын
Awesomely explained...ty
@SangelRally
@SangelRally 3 жыл бұрын
That was Excellent !!!
@mgp09
@mgp09 3 жыл бұрын
Thank you this helped a lot.
@charlesbovalis6591
@charlesbovalis6591 5 жыл бұрын
Corey - ONCE AGAIN - in a matter of a few minutes - you have cleared a topic that was very unclear to me - THUMBS UP !!!!! Now - I do have a question - do you have a tutorial on what "ssh-agent" and "ssh-agent forwarding" is ? If I can "clear" these concepts in my mind - I will be "golden" ... Only "you" have the "charisma" to clear such tricky topics in a simplistic, comprehensive, and making it "stick" permanently in someone's brain. :) Let me know when you can. Thank you.
@coreyms
@coreyms 5 жыл бұрын
No, I don't have a video on anything like that yet. I'll write it down in my list of video suggestions though! I can't promise I'll get around to it soon since I have a couple of series' backed up at the moment, but I'll do what I can.
@charlesbovalis6591
@charlesbovalis6591 5 жыл бұрын
@@coreyms Thank you Corey - and one quick clarification - when someone becomes a "paid" member of your channel - does this mean I get access to more topics / classes than what we see here "free" in youtube ? Once again - I cannot express my gratitude for discovering you - which first and foremost proves that a "good teacher" is PRICELESS !!!! It's only now after many years of using ssh that I finally understood how things work under the hood .. And so many other topics ... I have passed your name to several colleagues and friends as well ... You are simply "Priceless" !!!!!
@coreyms
@coreyms 5 жыл бұрын
All of my content is currently available for free. I want everyone to be able to access it. Contributors allow me to keep everything free for everyone, so that’s really where that helps most! I do have a few extra perks for paid members, but it isn’t much. For example, I’ll occasionally make a members only post asking a question where I can get responses from paying members and prioritize those first. But mainly it’s just to help keep my classes free for everyone. Thanks for considering!
@lightninginmyhands4878
@lightninginmyhands4878 5 жыл бұрын
Well said!
@Udaridamarakula1234
@Udaridamarakula1234 Жыл бұрын
I immediately subscribed your channel .
@rahul95968
@rahul95968 6 жыл бұрын
@Corey Schafer - Can you please make a video on Regex Expression in python
@micortes89
@micortes89 3 жыл бұрын
Awesome tutorial. Thanks a lot.
@MichaelAverage
@MichaelAverage 4 жыл бұрын
Third time this year here. thanks for this great video
@MichaelAverage
@MichaelAverage 4 жыл бұрын
Fifth*
@MichaelAverage
@MichaelAverage 2 жыл бұрын
Hey there, i am back after some time :D
@christopergiron339
@christopergiron339 3 жыл бұрын
Really helpful video for beginners like me.
@drumman22
@drumman22 6 жыл бұрын
nice vid, could you do a series on python flask or django, and do a video about regex?
@sreekanthk5454
@sreekanthk5454 2 жыл бұрын
Nice and clear, Thank you
Automate Your Development Environment Setup with Scripts and Dotfiles
30:09
Linux/Mac Terminal Tutorial: How To Use The find Command
17:45
Corey Schafer
Рет қаралды 190 М.
Stupid man 👨😂
00:20
Nadir Show
Рет қаралды 23 МЛН
蜘蛛侠这操作也太坏了吧#蜘蛛侠#超人#超凡蜘蛛
00:47
超凡蜘蛛
Рет қаралды 46 МЛН
😱СНЯЛ СУПЕР КОТА НА КАМЕРУ⁉
00:37
OMG DEN
Рет қаралды 1,8 МЛН
SSH Keys
10:12
RobEdwards
Рет қаралды 95 М.
The OpenSSH Client Config File: Simplify your SSH Connections
17:23
Learn Linux TV
Рет қаралды 30 М.
Crack SSH Private Key Passwords with John the Ripper [Tutorial]
12:51
SSH Full Course - EVERYTHING You Need to Know!
1:28:00
Learn Linux TV
Рет қаралды 547 М.
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 985 М.
Linux/Mac Terminal Tutorial: How To Use The cURL Command
8:58
Corey Schafer
Рет қаралды 194 М.
The Beginner's Guide To SSH
20:10
DistroTube
Рет қаралды 52 М.
Customizing Your Terminal: Adding Color and Information to Your Prompt
18:36
Stupid man 👨😂
00:20
Nadir Show
Рет қаралды 23 МЛН