Skip to content

profiles/cluster: Use cirrus-stored SSH keys in SSH client

André Breda requested to merge ist189409/nixrnl:cirrus-ssh-client into master

Description of changes

While testing !24 (merged), I noticed I forgot to reintroduce the automatic loading of keys from the user's cluster home into their SSH client when logged into borg. Interestingly, setting the HOME environment variable does not change the paths from where keys are loaded: the real home directory is always considered.

This MR makes the SSH client consider all identities with the usual names stored under $CLUSTER_HOME/.ssh.

Ideally we would also load $CLUSTER_HOME/.ssh/config, but the Include configuration key, unlike IdentityFile, does not expand environment variables.

I've considered also adding UserKnownHostsFile with a path in CLUSTER_HOME, but this is probably better served by a global known hosts with lab machines and borg keys (or better, a public key from some CA that signs their host keys 👀).

Things done

  • Tested
  • Updated documentation (Wiki/NetBox)
  • Breaking change

Merge request reports

Loading