Войти
  • 14789Просмотров
  • 3 года назадОпубликованоLearn Linux TV

Resetting OpenSSH Host Keys (the easy method)

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. *🐧 Donate to Learn Linux TV and Receive a PDF with tips for switching to Linux* Contains over 40 pages of tips and recommendations to help make your transition easier! Check it out here ➜ *👨🎓 Check out my latest Courses* Take your Linux Learning further! With my latest paid courses, you'll learn valuable skills that will enhance your career. Available for 50% off until September 30th! • Ansible Course ➜ • Linux Essentials Course ➜ *💧 Spin up some Linux Servers with Digital Ocean* Digital Ocean is a great way to quickly spin up some Linux machines! • Check it out here ➜ (Affiliate Link) *🐧 Support Learn Linux TV* • Channel Membership ➜ • Patreon ➜ • Spin up your very own Linux server ➜ • Linux swag ➜ • Check out Netdata ➜ • Jay's Gear ➜ _Note: Royalties and/or commission is earned from each of the above links_ *Support Linux Learning!* • Grab some Linux swag from the official Merch Shop ➜ • Become a Channel Member here on YouTube ➜ • Become a Patron and gain access to exclusive perks ➜ • 5% discount on LPI exam vouchers ➜ • Check out my latest book, Mastering Ubuntu Server 4th Edition ➜ • Grab an awesome Pi-powered KVM ➜ • Jay's Gear ➜ _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 ➜ Official blog post for this video (contains the commands used) ➜ Full Linux Courses* • Linux Crash Course ➜ • Netdata ➜ • tmux ➜ • vim ➜ • Bash Scripting ➜ • Proxmox VE ➜ • Ansible (Udemy) ➜ • Linux Essentials (Udemy) ➜ *🎓 More About Learn Linux TV* • Main site ➜ • Community Forums ➜ • Github Account ➜ • Content Ethics ➜ • Request Paid Assistance ➜ ⚠️ Use Content Responsibly Learn Linux TV shares technical content intended to teach and help you, but it comes with no warranty. The channel is not liable for any damages from its use. Always ensure you have proper permissions, follow company policies, and comply with all applicable laws while working with infrastructure. 🚫 Authentic Content, No Shortcuts Learn Linux TV values integrity and does not engage in click-farming, unauthorized services, or artificial view inflation. All growth—subscribers, likes, and views—comes organically from high-quality Linux tutorials, reviews, and educational content created to genuinely help viewers. #OpenSSH #Linux #HostKeys