Resetting OpenSSH Host Keys (the easy method)

  Рет қаралды 11,910

Learn Linux TV

Learn Linux TV

Күн бұрын

When creating a deployment image or template for distributing Linux to devices or servers, it's a good idea to make sure that you reset the host keys for SSH. In this video, I'll show you an easy method I found for automating this.
🎓 CROWDSTRIKE CRASH SURVIVOR T-SHIRT
Commemorate the largest outage in history with the latest addition to the LLTV merch shop.
Get yours here ➜ learnlinux.link/crash-shirt
🎓 BRAND NEW UDEMY COURSES AVAILABLE!
Check out my new courses on Udemy and learn something new!
• Getting Started with Ansible ➜ learnlinux.link/ansible
• LPI Linux Essentials Complete Workshop ➜ learnlinux.link/linux-essentials
Support Linux Learning!
• Grab some Linux swag from the official Merch Shop ➜ merch.learnlinux.tv
• Become a Channel Member here on KZfaq ➜ learnlinux.link/member
• Become a Patron and gain access to exclusive perks ➜ learnlinux.link/patron
• 5% discount on LPI exam vouchers ➜ learnlinux.link/lpi-voucher
• Check out my latest book, Mastering Ubuntu Server 4th Edition ➜ ubuntuserverbook.com
• Grab an awesome Pi-powered KVM ➜ learnlinux.link/tinypilot
• Jay's Gear ➜ learnlinux.link/amazon
Note: Royalties and/or commission is earned from each of the above links
⏰ TIME CODES
00:00 - Intro
02:27 - Creating a sample VM
06:09 - Resetting the machine-id
07:45 - Demonstrating the issue with host keys
13:27 - Adding a systemd unit to clear the SSH host keys
19:20 - Creating a Proxmox template with the systemd unit installed and enabled
Relevant links
Systemd unit file used in this video ➜ learnlinux.link/ssh-reset
Official blog post for this video (contains the commands used) ➜ www.learnlinux.tv/?p=1665*🎓 FULL LINUX COURSES FROM LEARN LINUX TV*
• Linux Crash Course ➜ linux.video/cc
• Learn tmux ➜ linux.video/tmux
• Learn vim ➜ linux.video/vim
• Bash Scripting Series ➜ linux.video/bash
• Proxmox VE ➜ linux.video/pve
• Getting Started with Ansible (Udemy) ➜ learnlinux.link/ansible
• LPI Linux Essentials Workshop (Udemy) ➜ learnlinux.link/linux-essentials
🌐 LEARN LINUX TV ON THE WEB
• Main site ➜ www.learnlinux.tv
• Community ➜ community.learnlinux.tv
• Official Github Account ➜ github.com/LearnLinuxTV
• Enterprise Linux Security Podcast ➜ enterpriselinuxsecurity.show
• The Homelab Show Podcast ➜ thehomelab.show
• Jay on Udemy ➜ www.udemy.com/user/jay-lacroix-3
• Jay on Twitter ➜ x.com/JayTheLinuxGuy
• Content Ethics ➜ www.learnlinux.tv/content-ethics
• Request Assistance ➜ www.learnlinux.tv/request-ass...
⚠️ DISCLAIMER
Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. Always make sure you have written permission before working with any infrastructure and that you are compliant with all company rules, change control procedures, and local laws.
#OpenSSH #Linux #HostKeys

Пікірлер: 25
@williamevans6830
@williamevans6830 2 жыл бұрын
And this is why I subscribe to the channel. Simple but highly effective solutions. Great content.
@VinceScovetta
@VinceScovetta 23 күн бұрын
Thanks Jay... appreciate your approach to instruction
@camaycama7479
@camaycama7479 2 жыл бұрын
As always, super neat and straightforward! Great stuff, it is gonna help me out with the mess I'm actually dealing with my kubernetes cluster and workers!
@pawouapproval984
@pawouapproval984 2 жыл бұрын
Hey Jay! Just picked up your Ubuntu Server book from the library, was hyped when I saw it there!
@LearnLinuxTV
@LearnLinuxTV 2 жыл бұрын
That's so cool! I didn't even know any libraries were stocking it but that's really amazing to hear. I should check my local library out of curiosity.
@enziofrancescoli288
@enziofrancescoli288 Жыл бұрын
Thanks Jay for creating the video. Best Wishes.
@johngoard8272
@johngoard8272 2 жыл бұрын
I know this is off topic but I have just started using Linux Mint again after a long break and have installed the OS on my older Sandy Bridge build permanently . Thanks to your tutorials I now have a different view of the system and am enjoying using it whereas before I got bogged down with the use of the terminal for example - thanks again for the videos:)
@LearnLinuxTV
@LearnLinuxTV 2 жыл бұрын
I'm glad the content helped you out. That's awesome! Thank you so much.
@johngoard8272
@johngoard8272 2 жыл бұрын
@@LearnLinuxTV Yes Jay they were extremely informative and given in a very understandable manner as I was expecting to have to use the Terminal again as my previous experience of running a Linux distro. In fact, it isn't that different to Windows so it is going to be handy when my old machine runs out of Windows 10.
@ninja2807
@ninja2807 9 ай бұрын
Great content. Now I have to re-do my VM template to use this solution 😊
@Appalling68
@Appalling68 2 жыл бұрын
Excellent. Just freakin excellent. THANK YOU!
@storage000
@storage000 2 жыл бұрын
Great stuff, Thank you Jay; have learnt a lot from your channel
@LearnLinuxTV
@LearnLinuxTV 2 жыл бұрын
Glad to hear it!
@danielstellmon5330
@danielstellmon5330 2 жыл бұрын
Thank you for giving credit where its due on that script, even though you do not know the original author. For teaching I like the way you have this set up. In practice I would set up a GIThub with a bash script to install and set up the service.
@JPEaglesandKatz
@JPEaglesandKatz 2 жыл бұрын
Great video as usual.. Very helpful. I was wondering why I was getting this weird error message from time to time...
@rullywow3834
@rullywow3834 2 жыл бұрын
Love your Pop shirt! Great vid!
@LearnLinuxTV
@LearnLinuxTV 2 жыл бұрын
Thank you!! 😁
@Karl3.142
@Karl3.142 2 жыл бұрын
Thank you. Does sys-unconfig also do this? I assume sys-unconfig also does other things as it puts the system back to the out-of-box setup screen.
@Ranblv
@Ranblv 2 жыл бұрын
very useful thank you
@LearnLinuxTV
@LearnLinuxTV 2 жыл бұрын
My pleasure.
@dragon3602010
@dragon3602010 2 жыл бұрын
What's the method you were talking about at the beginning, the cloudinet?
@theinvincible4933
@theinvincible4933 2 жыл бұрын
its cloud-init
@ubmate2997
@ubmate2997 2 жыл бұрын
unable to get this to run on debian 11. the /dev/hwrng does not exist. any suggestions on what to do here? Thank you. Great video as always.
@d00dEEE
@d00dEEE 2 жыл бұрын
Next: Distribution of the new host keys to your ssh client machines. 😉 Assuming you've set "StrictHostKeyChecking yes" in ~/.ssh/config and need to automate replacement of values in known_hosts...
Proxmox Backup Server: Full Getting Started Guide!
58:23
Learn Linux TV
Рет қаралды 143 М.
Linux Crash Course - Public Key Authentication
19:05
Learn Linux TV
Рет қаралды 34 М.
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 10 МЛН
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 29 МЛН
The OpenSSH Client Config File: Simplify your SSH Connections
17:23
Learn Linux TV
Рет қаралды 31 М.
How to Reset SSH Host Keys when Deploying Linux Templates in Proxmox
20:56
Linux Command-Line Tips & Tricks: Over 15 Examples!
31:37
Learn Linux TV
Рет қаралды 214 М.
5 Must Have Tweaks to Secure OpenSSH
21:48
Learn Linux TV
Рет қаралды 27 М.
Git Essentials
30:03
Learn Linux TV
Рет қаралды 25 М.
Understanding SSH Host Keys
10:16
Matthew Sanabria
Рет қаралды 6 М.
Linux Crash Course - Data Streams (stdin, stdout & stderr)
17:13
Learn Linux TV
Рет қаралды 51 М.
you need to learn Docker RIGHT NOW!! // Docker Containers 101
23:19
NetworkChuck
Рет қаралды 2,6 МЛН
Linux Crash Course - Understanding File & Directory Permissions
35:48
Learn Linux TV
Рет қаралды 112 М.
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2,1 МЛН
НОВЫЕ ФЕЙК iPHONE 🤯 #iphone
0:37
ALSER kz
Рет қаралды 322 М.
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 523 М.
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 371 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН