linux_wiki:configure_key-based_authentication_for_ssh

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.


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"

  • linux_wiki/configure_key-based_authentication_for_ssh.1457215905.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)