Linux - Use ssh-copy-id Command to Achieve SSH Passwordless Login

1. Generate Public and Private Keys

ssh-keygen -t rsa

After entering according to prompts, will generate id_rsa and id_rsa.pub files in ~/.ssh directory

2. Establish Connection with Server

ssh-copy-id  [email protected]  //Example IP

Next will require entering connection password, after successful verification

3. Passwordless Login to Server

Try the following command to see if login succeeds directly:

ssh  [email protected]

It’s that simple

Article Link:

/en/archive/linux-ssh-copy-id-passwordless-login/

# Related Articles