ssh-init¶
Set up SSH keys for use inside containers.
Usage¶
asylum ssh-init
Description¶
Creates ~/.asylum/ssh/ with an Ed25519 key pair for use inside containers. The SSH directory is automatically mounted into every container at ~/.ssh/.
Specifically, ssh-init:
- Creates
~/.asylum/ssh/(mode 0700) - Copies
~/.ssh/known_hostsinto~/.asylum/ssh/known_hosts(merges and deduplicates if the file already exists) - Generates an Ed25519 key pair at
~/.asylum/ssh/id_ed25519(if no key exists) - Prints the public key with instructions to add it to GitHub/GitLab
After Setup¶
Add the printed public key to your Git hosting provider:
- GitHub: Settings > SSH and GPG keys > New SSH key
- GitLab: Preferences > SSH Keys > Add new key
You can also replace the generated key with your own — just put your key files in ~/.asylum/ssh/.
Notes¶
- Running
ssh-initagain is safe: it merges newknown_hostsentries and skips key generation if a key already exists. - The key comment is
asylum@<hostname>to help identify it on your Git provider.