Vim

Memo

SSH

# 1. Generate key with -t ed25519 or -t rsa -b 4096
ssh-keygen -t ed25519 -C "[email protected]"

# 2. Add the key to the ssh-agent
eval "$(ssh-agent -s)"
   
# -K is only needed for Mac OS
ssh-add -K ~/.ssh/mykey
# or
ssh-add --apple-use-keychain ~/.ssh/mykey

# 3. Add SSH key to the remote server
ssh-copy-id -i ~/.ssh/mykey user@remote

# 4. Connnect remote with the key
ssh -i ~/.ssh/mykey user@remote

multiple Github accounts

for ~/.ssh/config, set