LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 04-21-2021, 04:47 PM   #1
scottieH
Member
 
Registered: Mar 2021
Posts: 58

Rep: Reputation: Disabled
VMs have identical ssh_host_rsa_id keys?


I'm doing some testing, and I have 2 VMs setup to do so. I've noticed that these 2 machine have identical /etc/ssh/ssh_host_rsa_id keys.

Is this expected? Is it related to the hypervisor? They were instantiated from a the same image?

~Confused in Colorado

Im Runnin RHEL 7.9 with openSSH 4.44
 
Old 04-21-2021, 06:08 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
New ssh server keys are auto-created only if they do not already exist. If the base image contains the /etc/ssh/ssh_host* files, then each VM instantiated from that image will simply use those key files.
 
1 members found this post helpful.
Old 04-21-2021, 07:07 PM   #3
scottieH
Member
 
Registered: Mar 2021
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
New ssh server keys are auto-created only if they do not already exist. If the base image contains the /etc/ssh/ssh_host* files, then each VM instantiated from that image will simply use those key files.
So, I shou8ld be able to re-build them without issue? Do I need to restart sshd or anything?
 
Old 04-21-2021, 10:32 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Yes, you can rebuild the key files. As for restarting sshd, I have no idea, but it's a simple thing to do, so why not? Actually, the simplest thing to do would be to delete the existing files and then restart sshd, which will auto-create new key files.
 
Old 04-22-2021, 01:43 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
The ssh-keygen utility has the -A option for generating the host keys, but I would say the above recommendation of deleting the host keys and restarting the SSH daemon will be easier.
 
1 members found this post helpful.
Old 04-22-2021, 04:55 PM   #6
scottieH
Member
 
Registered: Mar 2021
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
The ssh-keygen utility has the -A option for generating the host keys, but I would say the above recommendation of deleting the host keys and restarting the SSH daemon will be easier.
Didn't even need to restart sshd. Thanks!
 
  


Reply

Tags
redhat, rsa, ssh keys, virtual machine, vmware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Migrate Virtualbox VMs Into KVM VMs In Linux LXer Syndicated Linux News 0 07-10-2020 01:01 AM
autofs local map files identical but not identical to automount jwaldram Linux - Server 2 10-26-2012 10:35 AM
[Tcptraceroute/Traceroute/Ping] Windows VMs & Linux VMs BiFo Linux - Networking 0 08-24-2010 02:07 PM
LXer: Using Xen With LVM-Based VMs Instead Of Image-Based VMs (Debian Etch) LXer Syndicated Linux News 0 01-14-2009 08:20 PM
Identical disks that are not identical staphanes Linux - Hardware 8 03-11-2006 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration