Generate a key pair on your local machine (if you don’t already have one):
ssh-keygen -t ed25519Manually append your public key to the remote’s ~/.ssh/authorized_keys:
# Copy you public ssh key using your custom [copy] alias.
cat ~/.ssh/id_ed25519.pub | copy
# 1) SSH to your target
# 2) prepare the directory and file
mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
# 3) paste the key into the authorized_keys file (replace the empty string with your copied key from source box)
echo "" >> ~/.ssh/authorized_keys