Copy your public SSH key to a server
how to copy ssh key to server | ssh-copy-id custom port | set up passwordless ssh login | ssh-copy-id | ssh-keys | loginCaution: This command changes the system. Understand what it does before you run it.
ssh-copy-id -i ~/.ssh/id_ed25519_server.pub -p 22 webuser@server.example.comLogs in to the server once with a password and appends the public key to the target user’s ~/.ssh/authorized_keys. Missing directories are created with the correct permissions. Keys that are already present are detected and not added twice.
Note: Afterwards, test the key login in a second session before disabling password authentication.
Also searched as
- how to copy ssh key to server
- ssh-copy-id custom port
- set up passwordless ssh login