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  root@192.168.0.100  //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  root@192.168.0.100

It’s that simple

Article Link:

https://alili.tech/en/archive/linux-ssh-copy-id-passwordless-login/

# Latest Articles