ssh totp

Dragon19

Active Member
Jan 4, 2020
49
9
28
33
I want to add TOTP to ssh but I'm not sure if it will mess upthe cluster communications. Can someone verify this will work okay?
 
Proxmox VE assumes that it can freely connect between cluster nodes using SSH in a non-interactive session, so that would need to be still allowed, else things like VM/CT migration will fail.

As the nodes use public key authentication to login you could move your login also to that and then switch the "PermitRootLogin" setting of sshd to "prohibit-password" on all nodes. Old SSH cluster join of new nodes would need manual auth with that, but new API method should work fine.

You could try to set it up in a way so that the nodes are exempt from doing TOTP. I'm really not sure if it's possible easily, but one can to per host settings with the "Match" expression in sshd server config, so it could maybe work.
See https://stackpointer.io/unix/linux-allow-ssh-root-login-specific-ip/618/ from some intro.
 

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!