eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

More validations around SSH keys

Open abhay-krishna opened this issue 3 years ago • 1 comments

The SSH key(s) for a user is one of the input fields in the provider Machine configs, to allow connecting to a node via SSH. This field is made mutable during upgrades to allow rotation of keys for security purposes. However, there is no guard around setting the field to empty ("") or if there is a typo in the public key field, which would lead to the user losing access to the nodes because the private key they use for SSH will not match the current public key on the node. Although an upgrade with the proper key would fix this, this puts too much belief on the upgrade not failing.

We should make this more robust by adding more validations around SSH keys during upgrade, such as:

  • Checking for empty string input
  • Warning user when changing SSH keys to a new value
  • Possible ssh-keygen checks to validate the public key matches private key (although this would mean the CLI reads the private key)

abhay-krishna avatar Nov 07 '22 05:11 abhay-krishna

Do we have a way for no ssh access? Seems like empty string is a good way to disable ssh.

TerryHowe avatar Nov 07 '22 19:11 TerryHowe