Closed capsulecorplab closed 1 year ago
Use Keychain (already installed in the image) per the following instructions
$ ssh-keygen -t ed25519 -C "simmons@j-dot.org"
# follow prompts and set a password
$ eval "$(ssh-agent -s)"
> Agent pid 59566
$ ssh-add ~/.ssh/id_ed25519
$ cat ~/.ssh/id_ed25519.pub
# Then select and copy the contents of the id_ed25519.pub file
# displayed in the terminal to your clipboard
$ ssh -T git@github.com
# Attempts to ssh to GitHub
> The authenticity of host 'github.com (IP ADDRESS)' can't be established.
> RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
> Are you sure you want to continue connecting (yes/no)?
# answer yes
> Hi username! You've successfully authenticated, but GitHub does not
> provide shell access.
$ sudo apt install keychain # installed in the kasm image already
# add the following to ~/.bashrc (~/.profile in kasm images)
# also set terminal preferences to launch as login shell in kasm
# eval `keychain --eval id_ed25519`
$ source ~/.bashrc
Restarting kasm requires rerunning
ssh-add ~/.ssh/id_ed25519
. Otherwise, ssh keys don't work