[SOLVED] unable to parse ssh_host_rsa_key.pub

EleventySeven

New Member
Jan 7, 2020
6
0
1
36
Attempting to create a cluster and I'm receiving the follow error:
unable to parse /etc/ssh/ssh_host_rsa_key.pub

I've been running a single instance of PMG for about 3 months now as an experiment and I'm ready to go live with the remainder of my domains, so redundancy is required. I receive the same error whether I attempt to create from the GUI or if I run pmgcm create and I receive on both the existing instance as well as the new one.

Other than IP and hostname both are identical:
PMG 6.1-4 on Debian 10
Single public IP
CSF firewall
pdns-recursor
sshd configured with alternative port and public key auth
 
Last edited:

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
4,548
1,202
164
South Tyrol/Italy
shop.proxmox.com
Hmm, this is pretty weird, I'd guess that that file does not exist on your setup?
ls -l /etc/ssh/ssh_host_rsa_key.pub

That normally only happens by "human meddling"

You can regenerate a new public/private keypair for the host with: ssh-keygen -f /etc/ssh/ssh_host_rsa_key -n ''
As you currently have none it should not do any harm.
 

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
4,548
1,202
164
South Tyrol/Italy
shop.proxmox.com
Or better, use ssh-keygen -A

-A For each of the key types (rsa, dsa, ecdsa and ed25519) for which host keys do not exist, generate the host keys with the default key file path, an empty passphrase, default bits for the key type, and default comment. [...] This is used by system administration scripts to generate new host keys.
 

EleventySeven

New Member
Jan 7, 2020
6
0
1
36
What's bizarre, and I apologize for not mentioning it initially, is that the file DOES exist. Specifically I have key pairs for dsa, ecdsa, ed25519, and rsa.

Could this be related to the installation of my personal keys when I disabled ssh password auth?
 

EleventySeven

New Member
Jan 7, 2020
6
0
1
36
After a little research, I found the following solution:

Bash:
rm -v /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
systemctl restart ssh

Then, of course, I had to update my known_hosts files on all client computers with ssh key access.

I now have a cluster!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!