[SOLVED] PVE cluster: can I safely turn off ssh PermitRootLogin, PasswordAuthentication and UsePAM?

proxwolfe

Well-Known Member
Jun 20, 2020
501
52
48
49
Hi,

I have implemented certificate based authentication via SSH on my cluster nodes.

As with my VMs, I would now like to turn off PermitRootLogin, PasswordAuthentication and UsePAM. But it is my understanding that PVE uses SSH for cluster purposes and I don't want to break things.

So, can I safely turn these settings off or is any of them needed for the cluster to work?

Thanks!
 
I'm not sure how you could integrate it into Proxmox per se, but I think it would be handy if you could assign a non-root user with password-less ssh to be the agent user for proxmox clustering. Would add a degree of entropy for attackers by way of not knowing what user to attack, and you'd still be able to disable root login. Agreed on former comments though, disabling password is a good start
 
I'm not sure how you could integrate it into Proxmox per se, but I think it would be handy if you could assign a non-root user with password-less ssh to be the agent user for proxmox clustering. Would add a degree of entropy for attackers by way of not knowing what user to attack, and you'd still be able to disable root login. Agreed on former comments though, disabling password is a good start
that doesn't really work at the moment, since the stuff that is run over SSH needs root privileges (so even if you'd change the user that is used for SSH, that user would still need to be effectively root via setuid/passwordless sudo/...). this concerns just a few "cross-node" operations like migrations, accessing the console/shell of another node (or a guest running there), ..

SSH login with password is only needed if you use the legacy cluster joining method (that uses SSH), the default one uses the API. the "clustering" itself (as in, keeping track of quorum and syncing /etc/pve and metadata) is handled by corosync and pmxcfs and doesn't use SSH itself.
 
Thank you all for your input.

I had disabled PasswordAuthentication and PermitRootLogin. But then I ran into issues when trying to access the console of a VM on one node from one of the other nodes.

So I have now enabled PermitRootLogin again and the issues are gone (with PasswordAuthentication still disabled).
 

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 yours easily in our online shop.

Buy now!