SSH login without password

From PCLinuxOSHelp Knowledge Base
Jump to: navigation, search

SSH Login without Password

To login in SSH without password, we need to do the following:

1. Generate a key pair (private key and public key) in Server A
  ssh-keygen -t rsa
2. Copy the public key from Server A to Server B.
  scp username:[server_B_ip_address]:/home/username/.ssh
3. In Server B, add that public key into authorized_keys file.
  cat >> authorized_keys
4. Verify it from Server A.
  ssh username@[server_B_ip_address]