Fix for SSH Permission Denied (Public Key)

Sdílet
Vložit
  • čas přidán 8. 09. 2024

Komentáře • 314

  • @codewithsusan
    @codewithsusan  Před 4 měsíci +2

    If this info helped you out you can say thanks and support future content by clicking my Amazon affiliate link: amzn.to/3JwRQeF. If you make a purchase on Amazon within 24 hours of clicking the link I may receive a micro-commission and it costs you nothing extra. Any income from these sales goes directly to supporting me in making new videos and guides. Thank you for your support!

  • @fahadbutt7713
    @fahadbutt7713 Před rokem +13

    Best clear, concise explanation on the internet! Thank you!

  • @adityapalwankar1386
    @adityapalwankar1386 Před rokem +10

    Susan, words won't be enough to thank you on how amazing this tutorial is! So informative, so many positives. To begin with the way you explained, managed, wow! + you solved my problems in less then 15 mins, I have been googling for 60 mins! Thank you

  • @ankithshetty1153
    @ankithshetty1153 Před měsícem +1

    Thank you so much for your help with the authentication problem! I was stuck on this issue for a whole day, and your video provided the clear and effective solution I needed. I really appreciate your time and effort in making such valuable content. You’ve saved me a lot of frustration-thanks again! ❤

    • @jeffrisdon2803
      @jeffrisdon2803 Před 7 dny

      Hi all I figured it out! for some reason I had to use this line to create the publiv and private IDs ssh-keygen -t ed25519 -C "your email addy goes here". That worked!

  • @FR-vr2hd
    @FR-vr2hd Před 3 měsíci +2

    Hi Susan,
    Thanks for the awesome tutorial.
    It solved the issue that I was grappling with for the past 3+ days.
    None of the other tutorials even come close to what and how you have described the issue and its resolution.
    Thanks

  • @ashwanimehta721
    @ashwanimehta721 Před 6 měsíci +1

    I was stucked in this step from last 2 days and after seeing this video i did it in less than 5 mins. Words not enough to thank you @Susan.

  • @tejasatyanarayana
    @tejasatyanarayana Před 7 měsíci +3

    I never thought it could be my cloud providers mistake
    I am finally able to connect to my VM Thank you

  • @f1aziz
    @f1aziz Před rokem

    Thank you. Adding my current pub key fixed the issue.
    Note to anyone using Proxmox Hypervisor for VMs: We can inject ssh keys into the vm, through the Cloud-init option.

  • @DilatedPeoples10
    @DilatedPeoples10 Před rokem +2

    I was starting to lose my mind trying to figure this out! You are a life saver, thank you!

  • @hemathkumar4040
    @hemathkumar4040 Před dnem

    Susan its wonderfull explanation.
    My circleci CICD integration successfully done.

  • @justiny.2515
    @justiny.2515 Před 8 měsíci +1

    I'm so glad I had this issue, because now after watching your video, I finally have a decent understanding of how ssh works.
    Thank you :)

  • @912stable
    @912stable Před 3 měsíci

    I love this video. Thank you, Susan. You're more helpful than the folks at DO!

  • @kidfame5149
    @kidfame5149 Před 3 měsíci +1

    Only God can bless you me😭I was half fustrated😭❤

  • @donlee9193
    @donlee9193 Před 10 měsíci

    You know. I usually don't like videos much. But you solved a problem that was making me frustrate. Thank you

  • @mamotivated
    @mamotivated Před 4 měsíci

    This was a very useful video btw. Editing the config file helped me to solve my issue on runpod. Thanks

  • @mcfincher29
    @mcfincher29 Před 2 měsíci

    This saved me a lot of frustration. I couldn't find anything on google describing my issue, but I was missing the config file in ~/.ssh... Problem solved. Thank you so much

  • @KaWinchester
    @KaWinchester Před rokem +1

    1 gün boyunca uğraşıyordum sayende halledebildim

  • @spot1401
    @spot1401 Před rokem

    This helped me a bunch since both on my phone (termux) and my laptop, there was no config file generated. One file, one line -- solved. Thank you :)

  • @MercelSantos
    @MercelSantos Před 5 měsíci

    For sure, that is the best explanation about this subject ever. You saved hours of searching time. Thanks a lot. :)

  • @selehadinseid2958
    @selehadinseid2958 Před rokem

    thank you you have no idea how much time it toke but after trying every thing I have seen your video it was vary clear and straight forwarded it was help full.

  • @rupeshkl892
    @rupeshkl892 Před rokem +1

    Step by step instructions, which is required for a beginner and that is what you have take us through. Thank you and will follow you..!! HIGH FIVE🤟👏

  • @shahidkhan-saladguy
    @shahidkhan-saladguy Před 5 měsíci

    Love you Susan.... I was struggling since 3 days thanks alot

  • @_devdoug
    @_devdoug Před 7 měsíci +1

    Thanks Susan, you help me a lot your last method. Greetings from Brazil.

  • @sergiomancera9225
    @sergiomancera9225 Před rokem +1

    Very helpful. Thank you for making these troubleshooting guides for servers. Greetings from México!!

  • @ClashRoyale-pt9zj
    @ClashRoyale-pt9zj Před rokem +1

    thanks a lot!!! i was with trouble cause of custom name: i hadn't had a config file on my .ssh dir on windows with "IdentityFile [path-to-private-key]". THANK YOU

  • @sinalisuvinya4330
    @sinalisuvinya4330 Před 4 měsíci +1

    Thank you so much I owe you my degree!!!!much love

  • @pablocosta7181
    @pablocosta7181 Před rokem +2

    thanks sussan!!!

  • @hypolyxa7207
    @hypolyxa7207 Před rokem

    My problem was not having a username in front of the machine I wanted to connect to (RPI) as I had changed the SD card and the username was not the same. Probably would not have noticed that if I didn't see you entered username first. :D Thanks for the video!

  • @muhamadridwanfirdaus2832
    @muhamadridwanfirdaus2832 Před 7 měsíci +1

    Thanks its clear step and helpful to solve my issue

  • @yutigi
    @yutigi Před rokem +1

    Thank you for guiding us Susan.

  • @user-dy9zn3qi9l
    @user-dy9zn3qi9l Před rokem +1

    nice explanation

  • @ahmeedev
    @ahmeedev Před 9 měsíci

    A bundle of thanks, you saved my time. Carry on helping the community ma'am. Best of luck 🤞

  • @gwenaellebourhis976
    @gwenaellebourhis976 Před rokem +1

    Thanks Susan for this really clear video !

  • @mandeepmails
    @mandeepmails Před rokem +1

    Very helpful video. Thanks Susan.

  • @OrangeHat21
    @OrangeHat21 Před rokem

    Wonderful job Susan! You just saved my life! Thank you!

  • @christiancornel4636
    @christiancornel4636 Před rokem

    Thank you for this one. now i understand how SSH to be fixed

  • @haitech1994
    @haitech1994 Před 26 dny

    Thank you for the content, this has been a struggle to set the ssh with digital ocean and your content help a lot and I learnt new stuff about ssh. What about the add ssh key feature from the control panel of digital ocean why it doesn't work?

    • @codewithsusan
      @codewithsusan  Před 24 dny

      It's possible you're using the DigitalOcean "add a SSH key" feature that simply allows you to store a key with your DigitalOcean account that can automatically be added to new servers whenever they're created. This is different than adding keys to existing servers.

  • @2u841r
    @2u841r Před měsícem

    very well explained. thank you so much

  • @alexyapyap74
    @alexyapyap74 Před rokem +1

    thank you very much for a very good explanation!

  • @IkanaMusicBox
    @IkanaMusicBox Před rokem +2

    absolute lifesaver, thanks a lot

  • @PKASIMARK
    @PKASIMARK Před rokem

    Much love from Kenya. I found this so helpful!

  • @Ron_rudy
    @Ron_rudy Před 6 měsíci

    just 1 config file..... Thanks a billion

  • @tilltheend6634
    @tilltheend6634 Před rokem +1

    Pls please i have two kali on vmware bridged mod i have the good pubkeys good permissions ssh is active i can ping ssh is up when nmap i use the right private key but the error message when I try ssh is showing me the wrong finger print and its always the i have the good sshd_config too pubkeyauth yes

    • @codewithsusan
      @codewithsusan  Před rokem

      Regarding the wrong fingerprint - is the issue described in this video what you're seeing: czcams.com/video/Ias1KrmCpkg/video.html ?

  • @laurelineparis5407
    @laurelineparis5407 Před rokem

    Great video, explanation.
    Concise and accurate.
    Thanks for sharing such content🙌

  • @rothadapravith7657
    @rothadapravith7657 Před rokem +1

    Glad I found this solution

  • @greymatters2965
    @greymatters2965 Před rokem +2

    Glad I found this

  • @vijetakumar7347
    @vijetakumar7347 Před 8 měsíci

    Great explanation. Fixed my same issue with clear understanding.

    • @codewithsusan
      @codewithsusan  Před 8 měsíci

      Glad it was helpful; thanks for watching.

  • @marwaka
    @marwaka Před rokem +1

    This is helped me a lot

  • @user-pd4fl8cb9r
    @user-pd4fl8cb9r Před rokem +1

    Thank you!

  • @SanthoshHugar
    @SanthoshHugar Před 8 měsíci

    Very well explained. Thanks. It helped me.

  • @evisiongroup24
    @evisiongroup24 Před rokem

    Thank you. It helped a lot. It just worked as expected

  • @upworkprofilevideonoorulam440

    nice explanation. Thanks

  • @sayehghaderi9455
    @sayehghaderi9455 Před rokem +1

    Thank you. Awesome Job 🎉

  • @ofabiosm
    @ofabiosm Před rokem

    thats the best video on the entire internet, thank you!

  • @delesoft
    @delesoft Před rokem +1

    Thank you, great content.

  • @menfem
    @menfem Před rokem +1

    thanks susan, this was a massive help !!

  • @Bobapartea
    @Bobapartea Před rokem +1

    This was soooo helpful! Thank you so much!

  • @muzikmyke3008
    @muzikmyke3008 Před rokem

    Best video I've found. Thank you! Fixed my issue.

  • @stefwill
    @stefwill Před rokem

    Interesting authorisation method for notes access :)

    • @codewithsusan
      @codewithsusan  Před rokem +2

      Seems like a fair exchange for free content, no? : )

  • @TheNerdEngineer1
    @TheNerdEngineer1 Před 10 měsíci

    Best! save my day. Thanks.

  • @harikrishna3258
    @harikrishna3258 Před rokem

    Thank You very much Susan! It helped me fix the issue

  • @uxnitro
    @uxnitro Před rokem

    Thanks for the great tutorial. Please make a tutorial on ssh and ftp root and sudo proper usage. All newbies struggle with file permissions. Thanks

    • @codewithsusan
      @codewithsusan  Před rokem

      Good suggestion. I have a video I want to make on increasing server security and this would be a good tie-in.

  • @gabrielpatrick6923
    @gabrielpatrick6923 Před 7 měsíci

    This is very helpful, well articulated.

  • @abdidahir2293
    @abdidahir2293 Před rokem +1

    great job

  • @ricocollina3549
    @ricocollina3549 Před rokem

    I did follow almost everything but stuck with the step of having authorized_keys. This file is not on my server. So I tried creating one and adding the public key to it but to no avail.

    • @codewithsusan
      @codewithsusan  Před rokem +1

      If you email me the output of the command "ssh -v your-username@your-ip-address" I can take a look and help you debug. mail@codewithsusan.com.

  • @cassius.giorgio
    @cassius.giorgio Před 10 měsíci

    Awesome and very clear, thanks for sharing your acknowledgement

  • @saviouressien1317
    @saviouressien1317 Před 10 měsíci

    Awesome, clear and concise tutorial.

  • @am7-p
    @am7-p Před rokem

    Thank you for the step by step guide

  • @lajeferrario
    @lajeferrario Před rokem +1

    Great video! Thanks

  • @mahmoudtimoumi9061
    @mahmoudtimoumi9061 Před 10 měsíci

    big thanks to you , You relay helped me

  • @CaseyMcKean
    @CaseyMcKean Před rokem +1

    My ssh folder on my vm doesn't contain "authorized_keys" file but a "known_hosts" file, do these represent the same use?

    • @codewithsusan
      @codewithsusan  Před rokem +1

      Hi Casey - If you don't see an authorized_keys file there you can create it. The known_hosts file is different - that keeps track of what external hosts that system has connected to so that when you go to connect to those hosts again, it won't prompt you to approve the connection.

    • @CaseyMcKean
      @CaseyMcKean Před rokem

      @@codewithsusan Thanks so much, this worked!

  • @mbodeomo
    @mbodeomo Před rokem

    what if after checking the config file and the IdentityFile is pointing to the right key, but after running verbose you see that it is the default id_rsa key that is being picked up?

    • @codewithsusan
      @codewithsusan  Před rokem

      You can attempt the SSH connection by explicitly specifying which key to use. This will confirm/deny the key you are trying to use is functioning.
      The command to do that is:
      ssh -i ~/.ssh/your-key your-username@your-server-ip
      If that succeeds you know the key is not the problem, but there is some problem with your SSH config or how the key was added to the config.
      If it fails, you know it's a problem with the key.
      Feel free to follow-up with what you find and I can continue to help you troubleshoot.

  • @georgidimitrov1417
    @georgidimitrov1417 Před 10 měsíci +1

    Subscribed!

  • @ikhwanulabiyu6325
    @ikhwanulabiyu6325 Před rokem

    nice explanation!

  • @bilalabbaszaidi
    @bilalabbaszaidi Před rokem

    Very well explained. Thank you

  • @ChastainSanchez
    @ChastainSanchez Před rokem

    when checking the connection with ssh -v it shows that it is not using the correct key file. How do i fix. In terraform the path to key file is correct but it is still trying to find the pair in the wrong key file

    • @codewithsusan
      @codewithsusan  Před rokem +1

      Hi Chastain - If you want to share the output of `ssh -v` with me via email (mail@codewithsusan.com) I can help you troubleshoot further.

  • @datboyblu3
    @datboyblu3 Před rokem

    Easy explanation, thank you!

  • @user-ku6ig3iv4e
    @user-ku6ig3iv4e Před 10 měsíci

    hopefully this save my live

  • @MrMohadomar
    @MrMohadomar Před rokem +1

    thank you

  • @ruqsaysfaraway
    @ruqsaysfaraway Před rokem

    thank you this is so helpful

  • @RedBugBoy
    @RedBugBoy Před 8 měsíci

    Thanks - finally managed to sorted

  • @mariasolgonzalez4786
    @mariasolgonzalez4786 Před rokem

    Thank u so much!!! It was very helpful ;)

  • @sajadzirak43
    @sajadzirak43 Před měsícem

    that was really really really helpful

  • @nicolascuestaquintero9708

    Outstanding video

  • @Spumilupi
    @Spumilupi Před rokem

    Not sure if this is still being followed or not but here it goes…. Would this problem be the same if I am getting a message that says “permission denied (publickey,password)”? I am only getting the message after trying a password three times (but it’s the password I’ve used for the past four months). It just seems to have stop being recognized.

    • @codewithsusan
      @codewithsusan  Před rokem

      If you're using passwords to log in, the SSH keys should be irrelevant. Odd that it had been previously working and just stopped. Do you have some alternative way to log into your server to troubleshoot (E.g. another member on your team that has access or via a dashboard from your server provider) ?

  • @engrekomobongcletus8224

    Thank you, great content and very helpful.

  • @WoLFyy2009
    @WoLFyy2009 Před rokem +1

    thanks susan that was helpful

  • @jennifercoyle9178
    @jennifercoyle9178 Před rokem

    Okay I’m gon try this now

  • @soufianeelmessaoudi341
    @soufianeelmessaoudi341 Před 6 měsíci

    Hey Susan thank you

  • @Burakdagl
    @Burakdagl Před rokem

    very helpful , thank you so much

  • @user-ei7rv8co1p
    @user-ei7rv8co1p Před 6 měsíci

    but I haven't access to the server..what I should I do except I contact to the admin :(

    • @codewithsusan
      @codewithsusan  Před 5 měsíci

      If you don't have access, yes you will have to contact the admin.

  • @aron392
    @aron392 Před rokem

    wonderful video

  • @johnsony4646
    @johnsony4646 Před 3 měsíci

    Thank You maam your solution worked

  •  Před rokem

    Hi Susan. I've got this working as you told connecting via console in my cloud. I put my public key in there but only my pc has access to that vm. How can I have this working for any other computers from my office?

    • @codewithsusan
      @codewithsusan  Před rokem +1

      For each computer you want to connect from, you want to generate a key pair and install the public key from that pair on the server. Here's my video on setting up keys: czcams.com/video/k7Q-QfiOPLk/video.html

    •  Před rokem

      @@codewithsusan Thank you!

  • @abhishekmore6886
    @abhishekmore6886 Před rokem +1

    thanks a lot !!!

  • @phillipjohnson7928
    @phillipjohnson7928 Před rokem

    Great Video thanks Susan

  • @pablocosta7181
    @pablocosta7181 Před rokem +1

    gracias pór su aporte

  • @alvarorodriguezgomez8716
    @alvarorodriguezgomez8716 Před 5 měsíci

    nice vid, what if the folder which point to the config is instead /etc/sshh and not ~/.ssh?

    • @codewithsusan
      @codewithsusan  Před 5 měsíci

      Are you saying your config file is located in /etc/ssh or that the line within the config file that identifies the SSH key is pointing to /etc/ssh?

  • @avaneeshthakurrana1264

    Thanks a ton for the detailed information ❤

  • @mohamedsuliman1305
    @mohamedsuliman1305 Před rokem

    What if I get this error and I don't see any files for the public key or the private key?

    • @codewithsusan
      @codewithsusan  Před rokem +1

      If you don't see a public or private key, you'll need to generate them. Instructions here: czcams.com/video/k7Q-QfiOPLk/video.html

    • @mohamedsuliman1305
      @mohamedsuliman1305 Před rokem

      @@codewithsusan Thanks Susan!