Set up SSH public-key authentication

Using SSH public-key authentication to connect to a remote system is a robust, more secure alternative to logging in with an account password.

See if you have public-key generated.

local:~ user$ ls ~/.ssh
config id_rsa known_hosts

*.pub is your public-key. If you don't have it,

local:~ user$ ssh-keygen -t rsa

You will be prompted to supply a filename (for saving the key pair) and a passphrase (for protecting your private key):

Filename: To accept the default filename (and location) for your key pair, press Enter or Return without entering a filename. Password: If you press Enter or Return without entering a passphrase, your private key will be generated without password-protection.

SCP to copy the public key file (e.g., ~/.ssh/ to your account on the remote system (e.g., usersID@…);

 local:~ user$ scp ~/.ssh/

Don't forget ':'  You'll be prompted for your account password. Your public key will be copied to your home directory (and saved with the same filename) on the remote system.

Log into Cypress using your account username and password.

local:~ user$ ssh

You must have "" on your home directory

[user@cypress ~ $] ls

On the remote system, add the contents of your public key file (e.g., ~/ to a new line in your ~/.ssh/authorized_keys file; on the command line, enter:

 [user@cypress ~ $] cat ~/ >> ~/.ssh/authorized_keys

You may now safely delete the public key file (e.g., ~/ on Cypress; on the command line, enter:

  rm ~/

Now you should be able to login Cypress without typing password from next time.

Last modified 16 months ago Last modified on 11/08/22 19:14:08
Note: See TracWiki for help on using the wiki.