This is an old revision of the document!
Configure Key-based Authentication For SSH
General Information
SSH public/private key authentication for password-less logins.
On Server1
Generate public/private key pair
ssh-keygen
- By default, uses type “rsa”
- Private key in /home/<user>/.ssh/id_rsa
- Public key in /home/<user>/.ssh/id_rsa.pub
Copy from server1 to destination server2
ssh-copy-id user@192.168.1.151
Execute Command on remote system (or simply ssh login normally)
ssh user@192.168.1.151 "ls -la"