srl-labs / clabernetes

containerlab, but in kubernetes!
BSD 3-Clause "New" or "Revised" License
48 stars 9 forks source link

clabverter to create config maps with public keys from user's host to enable pass-less ssh access #18

Open hellt opened 11 months ago

hellt commented 11 months ago

One of the niceties coming with clab (for srlinux) is auto-enabled pass-less ssh login.

It is enabled with containerlab gleaning public keys from ~/.ssh/*.pub and reading keys from SSH agent. Then this is all fed to srlinux via config as part of the postdeploy stage.

In clabernetes this can be handled by clabverter (or any other c9s runner in the future). The same logic can apply when clabverter creates config maps with public key material gleaned from pub files and agent (re-using clab code) and creating config maps that are mapped to ~/.ssh/authorized_keys file on launcher pod.

That way clab running in launcher could read keys from ~/.ssh/authorized_keys and provision them for srlinux enabling pass-less access.

steiler commented 11 months ago

Copy the pubkey code or import from clab? Tried importing, which gave me strange ignite runtime compile erorrs. Can try fixing them if importing is the preferred way.