Fix for SSH Permission Denied (Public Key)

  Рет қаралды 68,537

Susan B.

Susan B.

Күн бұрын

Troubleshooting steps for the error "Permission denied (publickey)" when attempting to SSH into a remote server.
This guide assumes you have already gone through the steps of setting up SSH keys, but they’re just not working. If you haven’t already set up your keys, start here: Creating a SSH key connection with a server - • Creating a SSH key con... .
NOTES: codewithsusan.com/notes/ssh-p...
=== CHAPTERS ===
00:00 Introduction - SSH key pair basics
01:21 Check your keys are a match
03:38 Make sure SSH config is using our key
04:49 Attempt SSH connection with verbose output
05:54 Accessing server to check public key from another computer
07:03 Accessing server via a password
08:46 Accessing server via server provider console
09:40 Check public key in ~/.ssh/authorized_keys
11:29 Confirming we can now SSH in
12:05 Recap
=== RELATED VIDEOS ===
Creating a SSH key connection with a server
• Creating a SSH key con...
Command Line Basics for Web Developers (Terminal / Git Bash)
• Command Line Basics fo...
Simple Command Line Text Editing with Nano
• Simple Command Line Te...
=== PRODUCTS I USE ===
Microphone: amzn.to/3ZRPdvb
Microphone windscreen: amzn.to/3ZRPdvb
(paid links)

Пікірлер: 303
@codewithsusan
@codewithsusan Ай бұрын
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 Жыл бұрын
Best clear, concise explanation on the internet! Thank you!
@FR-vr2hd
@FR-vr2hd 19 күн бұрын
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
@adityapalwankar1386
@adityapalwankar1386 Жыл бұрын
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
@codewithsusan
@codewithsusan Жыл бұрын
So happy it helped, @Aditya! 🙂
@ashwanimehta721
@ashwanimehta721 2 ай бұрын
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.
@spot1401
@spot1401 9 ай бұрын
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 :)
@sergiomancera9225
@sergiomancera9225 Жыл бұрын
Very helpful. Thank you for making these troubleshooting guides for servers. Greetings from México!!
@yutigi
@yutigi 10 ай бұрын
Thank you for guiding us Susan.
@OrangeHat21
@OrangeHat21 11 ай бұрын
Wonderful job Susan! You just saved my life! Thank you!
@laurelineparis5407
@laurelineparis5407 10 ай бұрын
Great video, explanation. Concise and accurate. Thanks for sharing such content🙌
@PKASIMARK
@PKASIMARK 10 ай бұрын
Much love from Kenya. I found this so helpful!
@DilatedPeoples10
@DilatedPeoples10 Жыл бұрын
I was starting to lose my mind trying to figure this out! You are a life saver, thank you!
@codewithsusan
@codewithsusan Жыл бұрын
You're welcome, glad it helped!
@sheyig346
@sheyig346 8 ай бұрын
Losing my mind right now
@zacharymcneely6039
@zacharymcneely6039 5 ай бұрын
@@sheyig346mee too lol
@rupeshkl892
@rupeshkl892 11 ай бұрын
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🤟👏
@912stable
@912stable 16 күн бұрын
I love this video. Thank you, Susan. You're more helpful than the folks at DO!
@selehadinseid2958
@selehadinseid2958 Жыл бұрын
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.
@codewithsusan
@codewithsusan Жыл бұрын
You're welcome - glad you found it helpful!
@Bobapartea
@Bobapartea Жыл бұрын
This was soooo helpful! Thank you so much!
@f1aziz
@f1aziz Жыл бұрын
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.
@Shaze1
@Shaze1 Ай бұрын
After spending hours on this error, this video fixed my problem. Thanks!
@serialGrowth
@serialGrowth 10 ай бұрын
Thank you. It helped a lot. It just worked as expected
@donlee9193
@donlee9193 7 ай бұрын
You know. I usually don't like videos much. But you solved a problem that was making me frustrate. Thank you
@menfem
@menfem 9 ай бұрын
thanks susan, this was a massive help !!
@MercelSantos
@MercelSantos 2 ай бұрын
For sure, that is the best explanation about this subject ever. You saved hours of searching time. Thanks a lot. :)
@ahmeedev
@ahmeedev 5 ай бұрын
A bundle of thanks, you saved my time. Carry on helping the community ma'am. Best of luck 🤞
@codewithsusan
@codewithsusan 5 ай бұрын
Happy to help!
@gwenaellebourhis976
@gwenaellebourhis976 Жыл бұрын
Thanks Susan for this really clear video !
@codewithsusan
@codewithsusan Жыл бұрын
Glad it was helpful!
@KaWinchester
@KaWinchester Жыл бұрын
1 gün boyunca uğraşıyordum sayende halledebildim
@saviouressien1317
@saviouressien1317 6 ай бұрын
Awesome, clear and concise tutorial.
@markm4642
@markm4642 21 күн бұрын
This was a very useful video btw. Editing the config file helped me to solve my issue on runpod. Thanks
@datboyblu3
@datboyblu3 10 ай бұрын
Easy explanation, thank you!
@sayehghaderi9455
@sayehghaderi9455 11 ай бұрын
Thank you. Awesome Job 🎉
@mandeepmails
@mandeepmails Жыл бұрын
Very helpful video. Thanks Susan.
@codewithsusan
@codewithsusan Жыл бұрын
Glad it was helpful!
@muzikmyke3008
@muzikmyke3008 Жыл бұрын
Best video I've found. Thank you! Fixed my issue.
@codewithsusan
@codewithsusan Жыл бұрын
Glad it helped!
@alexyapyap74
@alexyapyap74 11 ай бұрын
thank you very much for a very good explanation!
@fabiomatos1083
@fabiomatos1083 9 ай бұрын
thats the best video on the entire internet, thank you!
@bilalabbaszaidi
@bilalabbaszaidi 9 ай бұрын
Very well explained. Thank you
@phillipjohnson7928
@phillipjohnson7928 Жыл бұрын
Great Video thanks Susan
@am7-p
@am7-p Жыл бұрын
Thank you for the step by step guide
@delesoft
@delesoft Жыл бұрын
Thank you, great content.
@justiny.2515
@justiny.2515 5 ай бұрын
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 :)
@codewithsusan
@codewithsusan 5 ай бұрын
Awesome :)
@SamanyuKaushik
@SamanyuKaushik 8 ай бұрын
amazing video and notes
@gabrielpatrick6923
@gabrielpatrick6923 3 ай бұрын
This is very helpful, well articulated.
@mariasolgonzalez4786
@mariasolgonzalez4786 Жыл бұрын
Thank u so much!!! It was very helpful ;)
@lajeferrario
@lajeferrario Жыл бұрын
Great video! Thanks
@harikrishna3258
@harikrishna3258 Жыл бұрын
Thank You very much Susan! It helped me fix the issue
@codewithsusan
@codewithsusan Жыл бұрын
Glad it helped!
@avaneeshthakurrana1264
@avaneeshthakurrana1264 Жыл бұрын
Thanks a ton for the detailed information ❤
@codewithsusan
@codewithsusan Жыл бұрын
No problem. Thanks for watching Avaneesh!
@shahidkhan-saladguy
@shahidkhan-saladguy 2 ай бұрын
Love you Susan.... I was struggling since 3 days thanks alot
@codewithsusan
@codewithsusan Ай бұрын
Glad the struggle is over :)
@SR-fi8ef
@SR-fi8ef Жыл бұрын
Thank you, great content and very helpful.
@_devdoug
@_devdoug 4 ай бұрын
Thanks Susan, you help me a lot your last method. Greetings from Brazil.
@codewithsusan
@codewithsusan 3 ай бұрын
Glad it helped!
@MarcosMGCN
@MarcosMGCN Жыл бұрын
Nice! Thanks for the help :)
@cassius.giorgio
@cassius.giorgio 7 ай бұрын
Awesome and very clear, thanks for sharing your acknowledgement
@SCSUSEGroupPizzaProject
@SCSUSEGroupPizzaProject 8 ай бұрын
Perfect, great video!
@acoustic7skate
@acoustic7skate 6 ай бұрын
this was what I needed. thank you!
@ruqsaysfaraway
@ruqsaysfaraway 11 ай бұрын
thank you this is so helpful
@WoLFyy2009
@WoLFyy2009 Жыл бұрын
thanks susan that was helpful
@upworkprofilevideonoorulam440
@upworkprofilevideonoorulam440 9 ай бұрын
nice explanation. Thanks
@marwaka
@marwaka Жыл бұрын
This is helped me a lot
@Burakdagl
@Burakdagl Жыл бұрын
very helpful , thank you so much
@greymatters2965
@greymatters2965 Жыл бұрын
Glad I found this
@vijetakumar7347
@vijetakumar7347 5 ай бұрын
Great explanation. Fixed my same issue with clear understanding.
@codewithsusan
@codewithsusan 5 ай бұрын
Glad it was helpful; thanks for watching.
@ikhwanulabiyu6325
@ikhwanulabiyu6325 10 ай бұрын
nice explanation!
@IkanaMusicBox
@IkanaMusicBox Жыл бұрын
absolute lifesaver, thanks a lot
@codewithsusan
@codewithsusan Жыл бұрын
Glad it helped!
@rothadapravith7657
@rothadapravith7657 Жыл бұрын
Glad I found this solution
@tejasatyanarayana
@tejasatyanarayana 3 ай бұрын
I never thought it could be my cloud providers mistake I am finally able to connect to my VM Thank you
@codewithsusan
@codewithsusan 3 ай бұрын
Glad you got it sorted out!
@iharshpatel
@iharshpatel 7 ай бұрын
Best! save my day. Thanks.
@christiancornel4636
@christiancornel4636 10 ай бұрын
Thank you for this one. now i understand how SSH to be fixed
@pablocosta7181
@pablocosta7181 Жыл бұрын
thanks sussan!!!
@SanthoshHugar
@SanthoshHugar 4 ай бұрын
Very well explained. Thanks. It helped me.
@codewithsusan
@codewithsusan 4 ай бұрын
Glad it helped!
@user-dy9zn3qi9l
@user-dy9zn3qi9l 10 ай бұрын
nice explanation
@mahmoudtimoumi9061
@mahmoudtimoumi9061 7 ай бұрын
big thanks to you , You relay helped me
@gilbertintabo160
@gilbertintabo160 Жыл бұрын
this was a great explanation
@codewithsusan
@codewithsusan Жыл бұрын
Thanks!
@user-pd4fl8cb9r
@user-pd4fl8cb9r Жыл бұрын
Thank you!
@biogfp9340
@biogfp9340 Жыл бұрын
Thank you!!! This solved my issue.
@codewithsusan
@codewithsusan Жыл бұрын
Excellent! :-)
@stefwill
@stefwill Жыл бұрын
Interesting authorisation method for notes access :)
@codewithsusan
@codewithsusan Жыл бұрын
Seems like a fair exchange for free content, no? : )
@muhamadridwanfirdaus2832
@muhamadridwanfirdaus2832 4 ай бұрын
Thanks its clear step and helpful to solve my issue
@adammeshulam3604
@adammeshulam3604 Жыл бұрын
perfect, thanks!
@ClashRoyale-pt9zj
@ClashRoyale-pt9zj 9 ай бұрын
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
@sequelman8997
@sequelman8997 Жыл бұрын
Subscribed, great channel
@codewithsusan
@codewithsusan Жыл бұрын
Thanks @sequelman
@sanjanasrimahalingam8829
@sanjanasrimahalingam8829 Жыл бұрын
Very helpful
@georgidimitrov1417
@georgidimitrov1417 7 ай бұрын
Subscribed!
@aron392
@aron392 Жыл бұрын
wonderful video
@abdidahir2293
@abdidahir2293 Жыл бұрын
great job
@elisiofilho
@elisiofilho Жыл бұрын
Great thanks!
@nicolascuestaquintero9708
@nicolascuestaquintero9708 Жыл бұрын
Outstanding video
@codewithsusan
@codewithsusan Жыл бұрын
Appreciate it!
@hypolyxa7207
@hypolyxa7207 10 ай бұрын
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!
@sinalisuvinya4330
@sinalisuvinya4330 Ай бұрын
Thank you so much I owe you my degree!!!!much love
@user-xt4zj7vc5p
@user-xt4zj7vc5p 3 ай бұрын
Worked! Thanks♥︎
@laurahenaocaviedes1248
@laurahenaocaviedes1248 7 ай бұрын
Great video
@soufianeelmessaoudi341
@soufianeelmessaoudi341 3 ай бұрын
Hey Susan thank you
@CarlosPecanha-fs4tu
@CarlosPecanha-fs4tu Жыл бұрын
Thanks!
@aymankamal4495
@aymankamal4495 Жыл бұрын
Great, Thanks
@TechnoBeee
@TechnoBeee Жыл бұрын
Thanks so much!
@codewithsusan
@codewithsusan Жыл бұрын
You're welcome!
@Eggsec
@Eggsec Жыл бұрын
question, I was giving the RSA private key to login from work, could I ask you how to go abouts to connect? i've been googling this all day. Do i need to override my private key to the key i was giving? thank you.
@codewithsusan
@codewithsusan Жыл бұрын
In your case, you're not generating the keys on your computer, you're working with an existing key. To set this up, place the key they gave you in your computer's ~/.ssh directory. You can name this file whatever you want, but let's say for example you call it "my-work-key" (because it's a private key, we won't use an extension). Then, edit your SSH config file (~/.ssh/config) like I showed in the video adding the line referencing this key (IdentityFile ~/.ssh/my-work-key). Now when you attempt to SSH into your work server, it should attempt to authenticate with that key. If that doesn't work, let me know and I can help debug further.
@alfiandimasahsanulrizkiahm450
@alfiandimasahsanulrizkiahm450 8 ай бұрын
great info
@peerajosvitayanon6518
@peerajosvitayanon6518 Жыл бұрын
Great tutorial
@codewithsusan
@codewithsusan Жыл бұрын
Thank you!
@adityarosiadi8975
@adityarosiadi8975 7 ай бұрын
Nice Info
@jamalhassouni
@jamalhassouni 10 ай бұрын
thanks that works for me
@user-ku6ig3iv4e
@user-ku6ig3iv4e 7 ай бұрын
hopefully this save my live
@CaseyMcKean
@CaseyMcKean Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@codewithsusan Thanks so much, this worked!
@abhishekmore6886
@abhishekmore6886 Жыл бұрын
thanks a lot !!!
@codewithsusan
@codewithsusan Жыл бұрын
Welcome!
@annahall2241
@annahall2241 7 ай бұрын
thanks so useful
@Spumilupi
@Spumilupi 9 ай бұрын
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 9 ай бұрын
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) ?
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 44 МЛН
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 74 МЛН
SHE WANTED CHIPS, BUT SHE GOT CARROTS 🤣🥕
00:19
OKUNJATA
Рет қаралды 14 МЛН
M4 iPad Pro After 2 Weeks of Nonstop Use - What Went Wrong?
18:24
Brandon Butch
Рет қаралды 45 М.
Permission Denied (Public key) Solved Alx
9:54
YpnConnect-Soft
Рет қаралды 2 М.
Warp Solutions: RisingWave & WarpStream
2:44
WarpStream
Рет қаралды 58
M2 iPad Air Review after 2 Weeks - BEST 2024 Tablet!
10:13
Max Tech
Рет қаралды 48 М.
Essential First Steps for Every New Linux Server Build
20:39
Learn Linux TV
Рет қаралды 165 М.
[Solved!!] Vagrant SSH Permission Denied (public key)
6:37
Enkripsan
Рет қаралды 2,9 М.
AI’s ‘Her’ Era Has Arrived
12:23
AI Uncovered
Рет қаралды 18 М.
0x0E. Web stack debugging #1 (Debugging nginx)
3:38
RANDOMMALL
Рет қаралды 6 М.
Linux Crash Course - Public Key Authentication
19:05
Learn Linux TV
Рет қаралды 33 М.
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 44 МЛН