OpenSSH Passwordless Authentication

From UNIX Systems Administration
Revision as of 17:43, 12 January 2016 by Michael Kohler (talk | contribs) (Created page with "== Method 1 == # Create a public and private RSA key pair. ## <tt>'''$ ssh-keygen -t rsa'''</tt> ## Follow the prompts to generate and save the RSA key. # Transfer the public...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Method 1

  1. Create a public and private RSA key pair.
    1. $ ssh-keygen -t rsa
    2. Follow the prompts to generate and save the RSA key.
  2. Transfer the public key to the target host.
    1. $ ssh-copy-id <username>@<hostname>
    2. Follow the prompt to enter your password.
  3. Test the passwordless authentication.
    1. $ ssh <username>@<hostname>

Method 2

  1. Create a public and private RSA key pair.
    1. $ ssh-keygen -t rsa
  1. Test the passwordless authentication.
    1. $ ssh <username>@<hostname>