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

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 254

  • @naavu_neevu
    @naavu_neevu 7 лет назад +72

    Well Explained. As a developer, it was bit difficult to understand others tutorial. Keep up the good work.

  • @chetansharma5514
    @chetansharma5514 4 года назад +32

    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

  • @kalyanhr
    @kalyanhr 5 лет назад +19

    Simple, Clear and Short video about SSH. Just just nailed it. Awesome job!!

  • @IcarianVX
    @IcarianVX 4 года назад +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.

  • @DannyDaDane
    @DannyDaDane 2 года назад

    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!

  • @pauloferreira4040
    @pauloferreira4040 Год назад

    Extremely clean and direct information. This soluton worked for me at the first trial! Thanks for taking the time to do this video.

  • @baldmike
    @baldmike 7 лет назад +21

    This one's the winner! Great video, very helpful, thank you.

  • @randmssolutions9013
    @randmssolutions9013 3 года назад +3

    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.

  • @BlancheNuit
    @BlancheNuit 2 года назад

    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

  • @ohtobetiramisu
    @ohtobetiramisu 2 года назад

    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 :)

  • @geoptus
    @geoptus 6 лет назад +4

    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

  • @kmontoya87
    @kmontoya87 2 года назад

    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!

  • @mattiylen
    @mattiylen 4 года назад +1

    Genuinely, very clear demonstration, rarely one can find as perfect as this

  • @AndyDavis007
    @AndyDavis007 5 лет назад +1

    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.

  • @bcross9109
    @bcross9109 6 лет назад +5

    Thanks for this video, way more practical and informative than the others I found!

  • @mamusthafa6
    @mamusthafa6 3 года назад +1

    Short and sweet. I understood very clearly. awesome teacher. Waiting for more videos like this...

  • @skyhackerfpv7104
    @skyhackerfpv7104 3 года назад

    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!

  • @MichaelAverage
    @MichaelAverage 5 лет назад +5

    Third time this year here. thanks for this great video

  • @zax71
    @zax71 3 года назад +1

    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 ~

  • @muijnckj
    @muijnckj 7 лет назад +3

    Finally a simple tutorial, it's not all that hard you know... Thank you!!

  • @w.schobel1514
    @w.schobel1514 7 лет назад +9

    As always: Perfect explained. Great vid !

  • @ayan1386
    @ayan1386 5 лет назад +9

    Amazing tutorial. Concise and to-the-point!

  • @portfedh
    @portfedh 2 года назад

    I keep finding your videos. They are are so good. Thank you.

  • @higiniofuentes2551
    @higiniofuentes2551 3 года назад

    Good video!
    Sometimes I didn't know I you were in the remote or in the main, but the information is accurate!
    Thank you!

  • @rajeevsuraneni8805
    @rajeevsuraneni8805 6 лет назад +6

    Thank you! This is by far the cleanest explanation

  • @hophmanbg
    @hophmanbg 6 лет назад +2

    You just put the light in my head thanks man and all the best.

  • @erickmwazonga8871
    @erickmwazonga8871 7 лет назад +1

    A clear and detailed explanation for a beginner and a clarification guide for a guru. Thank you.

  • @rafaeltravecedo7905
    @rafaeltravecedo7905 5 лет назад +2

    Thanks a lot. Your explanation about using SSH-KEYS is very clear.

  • @leopet6815
    @leopet6815 4 года назад +1

    Very concise info that is applicable to any server. Thank you!

  • @Sledy95
    @Sledy95 3 года назад

    Great video. Pearl in the sea of confusing tutorials :D

  • @csabajozsef8400
    @csabajozsef8400 5 лет назад +3

    Thanks for the quality videos, this is a very good place to learn.

  • @matteocassino3172
    @matteocassino3172 3 года назад

    Exactly what I was searching for. Thx a lot for the good job.

  • @kimgeen8002
    @kimgeen8002 2 года назад +1

    Thank you so much for this tutorial! Simple and well explained with all neccecary details!

  • @Appalling68
    @Appalling68 2 года назад

    Just stumbled upon this video. Nicely done and perfectly explained. Thank you.

  • @juancarlosrojas5858
    @juancarlosrojas5858 2 года назад +1

    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.

  • @claudiom07
    @claudiom07 3 года назад

    Corey... you saved my life!! Thank you for your clear explanation!

  • @blogcorpo
    @blogcorpo Год назад

    5 years and still amazing. ♥

  • @rmcellig
    @rmcellig 5 лет назад +1

    Excellent. Exactly what I was looking for!!

  • @tommygunn2782
    @tommygunn2782 2 года назад

    Wow, you are an amazing instructor!

  • @anisdhouieb9918
    @anisdhouieb9918 6 лет назад +1

    very good exaplanation in just 15 minutes

  • @Raqueem
    @Raqueem 3 года назад

    Thank you for the excellent tutorial and clear articulation ! loved it !

  • @AdrianMoseley
    @AdrianMoseley 4 года назад

    Excellent tutorial. I can now add this to my toolbelt.

  • @khalidginawi4938
    @khalidginawi4938 4 года назад +1

    great video, simple and to the point. thank you

  • @anandmurugan3804
    @anandmurugan3804 5 лет назад +1

    Thanks You So Much For This Video.. Its really helped me a lot in understanding of SSH key based authentication

  • @cyberofthinx
    @cyberofthinx 2 года назад

    Great video great simple explanation! It made my day, many thanks!

  • @smudgepost
    @smudgepost 5 лет назад +1

    Thank you! I've struggled with this for so long and this covers all variations so well, thanks!

  • @rueliotube
    @rueliotube 4 года назад

    Excellent video! Thanks for taking the time to educate me.

  • @rullywow3834
    @rullywow3834 6 лет назад +1

    Great video and clear explanation. Thanks!

  • @GustavAgar
    @GustavAgar Год назад

    a video about ssh port forwarding of you would be legendary !!

  • @victorespinoza355
    @victorespinoza355 4 года назад

    Thanks for these wonderful tutorials Corey. I hope you keep receiving blessings, lots of blessings

  • @Andrei-ds8qv
    @Andrei-ds8qv 5 лет назад +1

    Very clear, very good explanation, thanks

  • @magnusmorgens5966
    @magnusmorgens5966 5 лет назад +3

    Awesome
    now i got a safe way to enter my raspberry via pc and mobil
    thank you

  • @supa1009
    @supa1009 5 лет назад +1

    Amazing video Corey! Thank you very much :))

  • @seungwoochoe
    @seungwoochoe 3 года назад

    Wow, this was really helpful. Thank you!!

  • @jtrtsay
    @jtrtsay Год назад

    wow you are so amazing at keeping things easy to follow, successfull first try!

  • @elpedrooo2008
    @elpedrooo2008 6 лет назад +2

    Thank You , It was A clear Explanation

  • @surajoberai
    @surajoberai Год назад

    thank you. I have successfully set up key-based authentication on the remote server

  • @charlesbovalis6591
    @charlesbovalis6591 6 лет назад +2

    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  6 лет назад

      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 6 лет назад +2

      @@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  6 лет назад

      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!

  • @tejaseervi1151
    @tejaseervi1151 3 года назад

    Wow... Great explanation... As always in other videos.

  • @niraj874u
    @niraj874u 6 лет назад +2

    Thank you so much. Nice Explanation.

  • @pican32
    @pican32 2 года назад

    Very clear explanations, thanks so much

  • @satyareddy7728
    @satyareddy7728 5 лет назад +1

    Well Explained on Key based authentication

  • @navneetsingh285
    @navneetsingh285 4 года назад +1

    great explanation...so simple

  • @lucienmauricesenghor8216
    @lucienmauricesenghor8216 2 года назад

    I was waiting for this

  • @drego05
    @drego05 5 лет назад +2

    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  5 лет назад

      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.

  • @RCMOULI1
    @RCMOULI1 5 лет назад

    Easily explained. Keep adding more :)

  • @nidhipatel133
    @nidhipatel133 4 года назад

    This is the best video. Thank you so much for this.

  • @christopergiron339
    @christopergiron339 4 года назад

    Really helpful video for beginners like me.

  • @siamakshams1923
    @siamakshams1923 4 года назад

    Great tutorial Corey, thank you.

  • @kareemjeiroudi1964
    @kareemjeiroudi1964 6 лет назад +5

    Man, you're a goddamn good teacher 👍!

  • @Clem000
    @Clem000 4 года назад

    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.

  • @riadhtroudi295
    @riadhtroudi295 4 года назад +1

    very well explained, thank you very much for your time.

  • @sumitrawat3742
    @sumitrawat3742 3 года назад

    I think we can also use "ssh-copy-id " to copy keys from host to ssh machine.

  • @user-buter
    @user-buter 5 лет назад +1

    If u don't know about using ssh, then this video is place u must to start from. It would be good if u would talk couple words about ssh-agent, but anyway thx, its 5+ video.

  • @garryn123
    @garryn123 3 года назад

    clear and concise...excellent!!!

  • @iliasalqassar1489
    @iliasalqassar1489 5 лет назад +1

    Well Explained. Thx a lot !

  • @Udaridamarakula1234
    @Udaridamarakula1234 2 года назад

    I immediately subscribed your channel .

  • @vamsikrishna1131
    @vamsikrishna1131 6 лет назад +1

    excellent. precise and to the point..

  • @kalashshrma7265
    @kalashshrma7265 5 лет назад +1

    awesome, best explanation like always.

  • @bruceadam1772
    @bruceadam1772 2 года назад

    what a good video!!! well explained

  • @SangelRally
    @SangelRally 4 года назад +1

    That was Excellent !!!

  • @fata__morgana
    @fata__morgana 5 лет назад +1

    Excellent tutorial!

  • @arifsali
    @arifsali 7 лет назад +1

    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?

  • @muijnckj
    @muijnckj 7 лет назад

    I would like to add that it is quite handy to make a file named 'config' in the local .ssh folder and put:
    Host [your shortcode]
    HostName [hostname]
    IdentityFile ~/.ssh/[key file name]
    User [username]
    ...
    [copy the above for other servers]
    You can then type in de terminal 'ssh [your shortcode]' and log in directly.

  • @jingyuanhu9804
    @jingyuanhu9804 5 лет назад +1

    This is the best tutorial ever

  • @metamototomo
    @metamototomo 2 года назад

    That's amzaing tutorial. Thank you so much!

  • @micortes89
    @micortes89 4 года назад

    Awesome tutorial. Thanks a lot.

  • @antoinemercier82
    @antoinemercier82 5 лет назад +1

    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!

  • @MasayoMusic
    @MasayoMusic 7 лет назад +3

    I really need to start learning Linux.

    • @coreyms
      @coreyms  7 лет назад +4

      I put it off for a long time, but when I finally took the plunge I found that it made my life so much easier. I would highly recommend it.

    • @PyMoondra
      @PyMoondra 7 лет назад

      I also really need to get better acquainted with Linux. Once my second PC arrives at my place, I will check out your tutorials and set up Linux =)

    • @luiscortes6563
      @luiscortes6563 7 лет назад

      Yes you do!

  • @mikedan8972
    @mikedan8972 3 года назад

    well explained, thank you!

  • @lightninginmyhands4878
    @lightninginmyhands4878 5 лет назад +3

    11:40 - where you can use the 2nd of 2 methods for ssh.

  • @buddelbob
    @buddelbob 2 года назад

    Nice Tutorial. Correct me when I'm wrong, I usually use the command "ssh-copy-id user@server.ip" to do pretty the same thing.

  • @AbdulBasit-ib6by
    @AbdulBasit-ib6by 3 года назад

    Really awesome tutorial.

  • @mgp09
    @mgp09 4 года назад

    Thank you this helped a lot.

  • @sasankbabu2859
    @sasankbabu2859 5 лет назад +1

    I highly recommend this video

  • @jamescs50
    @jamescs50 4 года назад

    Thank you again Corey.

  • @maclanphere5674
    @maclanphere5674 5 лет назад

    excellent, thanks Corey. I'm guessing there is no issue with renaming these priv/pub key files after creation?

  • @kurtklein9183
    @kurtklein9183 3 года назад

    Very useful thank you 😍

  • @elliottmiller2052
    @elliottmiller2052 6 лет назад +1

    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.

  • @code_n_gainz
    @code_n_gainz 5 лет назад +3

    After restarting my PC I have again have to type password for accessing my remote PC. I check the sshd_config file there and the one we un-commented line(in sshd_config) is same as we changed it. But then also it is asking for password. What could be the problem?

    • @waipalisrevenge3707
      @waipalisrevenge3707 4 года назад

      Did you figure out what was wrong? Or did you manage to find a solution?