use ssh key pair on pve?

Beau

New Member
Mar 24, 2023
9
0
1
Hi, all I have a question on ssh keys and proxmox I am not on a cluster I would ssh key for the root user.
I know I need to edit sshd_config but I am looking for help on what to change not to break things
 
Hi,
you can simply add your ssh key to the pve hosts authorized_keys by running a command like ssh-copy-id -i path/to/keyfile root@host from the client.
 
Hi Chris,
the client is windows 11 i have made the key with puttygen
when I look at pve /etc/ssh i do not see authorized_keys
thanks for any help
 
Hi the first key is called ssh-rsa does my key need to replace that or can it be any name?
 
ssh-rsa is the key format or type, not the name.
Don't edit the generated key, just copy it with WinSCP or manually and that's it.
 
Hi Chris,
the client is windows 11 i have made the key with puttygen
when I look at pve /etc/ssh i do not see authorized_keys
thanks for any help
Hi,
please append the full content of the newly generated ssh public key from the Windows client to the /root/.ssh/authorized_keys file on the PVE host (make sure there is a newline after the existing keys). The run pvecm updatecerts, which merges the newly added key also to /etc/pve/priv/authorized_keys, relevant for PVE.
 

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!