Generating SSH key

  1. Generate a pair of private and public keys by running ssh-keygen, the default location of the private key is ~/.ssh/id_rsa (can be changed), the public key will be at ~/.ssh/id_rsa.pub
  2. Upload your key to a remote machine by running ssh-copy-id name@host (you can determine name@host by ifconfig command)