Тёмный

Understanding SSH Host Keys 

Matthew Sanabria
Подписаться 1 тыс.
Просмотров 5 тыс.
50% 1

Describing what SSH host keys are, what they are used for, and what actually happened when GitHub rotated their RSA SSH host key.
GitHub: github.com/sudomateo
LinkedIn: / sudomateo
Twitter: / sudomateo

Наука

Опубликовано:

 

25 мар 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@sureshmg6786
@sureshmg6786 10 месяцев назад
That is very well explained, I learned a lot from this video than I expected 🔥Keep going 👏🏼
@sudomateo
@sudomateo 7 месяцев назад
Thank you!
@chemseddsen
@chemseddsen Год назад
Very interesting explanation 🙏 thanks. I confirm: "Part of being a great Engineer, is knowing your tools and how to use them."
@sudomateo
@sudomateo Год назад
If you like that you might like some of the videos I collaborated on with my friend: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-I7xqY-YxtbY.html
@michelthibodeau8550
@michelthibodeau8550 Месяц назад
Good explanations ! many thanks !
@sudomateo
@sudomateo Месяц назад
You're welcome!
@aabishkarwagle8708
@aabishkarwagle8708 Год назад
you are such a good explainer 😮 subscribed
@sudomateo
@sudomateo Год назад
Thank you! I get that often which is why I like to create videos.
@itspk9076
@itspk9076 3 месяца назад
You got a new subscriber😊
@sudomateo
@sudomateo 3 месяца назад
Heck yeah! Thank you kindly!
@bat_man1138
@bat_man1138 8 месяцев назад
Nice vid brah
@ruffneck718
@ruffneck718 7 месяцев назад
Great video Sir
@sudomateo
@sudomateo 7 месяцев назад
Thank you!
@user-rv2vn8vs7v
@user-rv2vn8vs7v 9 месяцев назад
Beautiful !
@jimmyr3735
@jimmyr3735 Год назад
Keep it up brother 😀
@xpnt_
@xpnt_ 11 месяцев назад
thanks for the explanation!😁
@sudomateo
@sudomateo 11 месяцев назад
You're welcome!
@kmille1398
@kmille1398 5 месяцев назад
Great video. Well done. Are SSH Host keys only produced by the administrator of the server you are connecting to? I heard you say you generated your own public and private key pair. That public key you mentioned you created as part of that pair is different than the SSH Host key you are talking about in the video, correct? Is the public/private key pair you created to encrypt and decrypt PGP files only and not for host authentication (for example, logging into a server as you do in the video)?
@sudomateo
@sudomateo 5 месяцев назад
Correct! SSH host keys are generated by the system administrator where the SSH service is running. Usually the SSH host keys are generating automatically when the SSH service starts up if they are not already present. The SSH key pair (public/private) that you create for yourself is used to authenticate to a server that's speaking SSH. You upload the public key to the server via a trusted means and then when you want to connect to that server via SSH you just use your private key to encrypt some data and perform a key exchange that only your corresponding public key can decrypt successfully. However, when you first connect to a server over SSH, your local SSH client will ask you to verify the SSH host keys provided by the SSH service. That way when you connect in the future you can be sure you're connecting to the same SSH service as before and it wasn't tampered with.
@user-pz8cm8wk4t
@user-pz8cm8wk4t 8 месяцев назад
what's the purpose of this process? Does not everyone could get the public key and send to you ? How could the host key or the fingerprint verify the server?
@sudomateo
@sudomateo 7 месяцев назад
When you connect to an instance with SSH you receive the host key and are asked to trust it before connecting. Once you trust it then future connections still receive the host key from the instance and see if you have already trusted the host key for that particular instance. If you did then the connection will proceed. If you didn't trust that host key or if the host key that was presented by the instance changed then the connection would not be trusted and won't proceed. So it's a way to prevent man in the middle attacks and connecting to the a compromised instance.
@cyberwithdani
@cyberwithdani 11 месяцев назад
When you changed the host keys, you didnt change your private key on your laptop. So how did your previous private key work with the new host keys?
@sudomateo
@sudomateo 11 месяцев назад
You don't need to change your private key in this case. The host still had my public key, but the host key changed. I removed the old host key from my ~/.ssh/known_hosts, reconnected, and trusted the new host key. Then the connection proceeded and I was able to use my existing private key since the host already had my public key.
@alsonyang230
@alsonyang230 Год назад
Big thumbs up, I can move now (unfreezed)
@ndefrutitus4201
@ndefrutitus4201 Год назад
Great stuff ,i have same error but this solution does not work bc i can't even access the /etc/.ssh path . am using an amazon ec2 instance with a public ip, i can successfully ssh into it, when i want to ssh to another server from this server using its private ip ,it gives me this below error " [root@ip-10-0-0-237 ec2-user]# ssh ec2-user@10.0.2.241 The authenticity of host '10.0.2.241 (10.0.2.241)' can't be established. ECDSA key fingerprint is SHA256:H6vZk6QBx/tDE9Qwc4PgUZL4hfyQE+EtIf1SZzxKxgg. ECDSA key fingerprint is MD5:e1:e1:71:b2:c7:6d:08:ed:a8:bb:15:21:c3:75:7e:e4. Are you sure you want to continue connecting (yes/no)? Host key verification failed. [root@ip-10-0-0-237 ec2-user]# can you advice how to resolve this
@sudomateo
@sudomateo Год назад
You don't need access to /etc/.ssh. You only need access to ~/.ssh which is the .ssh directory in your user's home directory. In your case you can also check the ~/.ssh/known_hosts file to remove the host key for 10.0.2.241 and try the SSH again.
Далее
Resetting OpenSSH Host Keys (the easy method)
22:53
Просмотров 11 тыс.
SSH Keys
10:12
Просмотров 105 тыс.
🤔
00:28
Просмотров 386 тыс.
Strong cat !! 😱😱
00:19
Просмотров 885 тыс.
How SSH Works
8:54
Просмотров 499 тыс.
OpenSSH is about to change. (For the better.)
10:00
Просмотров 139 тыс.
SSH Certificate Authority Rocky Linux 8
19:53
Просмотров 10 тыс.
Tech Talk: What is Public Key Infrastructure (PKI)?
9:22
SSH Certificates: a way to scale SSH access
28:38
Просмотров 10 тыс.
Setting Up SSH Keys
21:02
Просмотров 42 тыс.
SSH Key Authentication | How to Create SSH Key Pairs
18:46
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00