Copy your public key to a server

One command instead of pasting into authorized_keys by hand.

SNP 119 #1B5 Filed ssh cmd

shell
ssh-copy-id -i ~/.ssh/id_ed25519.pub ian@server

It asks for your password one last time, appends the key to ~/.ssh/authorized_keys on the server and fixes the permissions. If you have no key yet:

shell
ssh-keygen -t ed25519 -C "ian@laptop"

Where ssh-copy-id is missing (Windows, some minimal images), the manual version is the same thing in one line:

shell
cat ~/.ssh/id_ed25519.pub | ssh ian@server 'mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys'