Changes between Initial Version and Version 1 of cypress/ssh_public-key_authentication


Ignore:
Timestamp:
11/08/22 19:14:08 (2 years ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/ssh_public-key_authentication

    v1 v1  
     1= Set up SSH public-key authentication =
     2
     3Using SSH public-key authentication to connect to a remote system is a robust, more secure alternative to logging in with an account password.
     4
     5See if you have public-key generated.
     6
     7{{{
     8local:~ user$ ls ~/.ssh
     9config id_rsa id_rsa.pub known_hosts
     10}}}
     11
     12
     13
     14***.pub is your public-key. If you don't have it,
     15{{{
     16local:~ user$ ssh-keygen -t rsa
     17}}}
     18
     19You will be prompted to supply a filename (for saving the key pair) and a passphrase (for protecting your private key):
     20
     21Filename: To accept the default filename (and location) for your key pair, press Enter or Return without entering a filename.
     22Password: If you press Enter or Return without entering a passphrase, your private key will be generated without password-protection.
     23
     24SCP to copy the public key file (e.g., ~/.ssh/id_rsa.pub) to your account on the remote system (e.g., usersID@cypress.tulane.edu);
     25{{{
     26 local:~ user$ scp ~/.ssh/id_rsa.pub usersID@cypress.tulane.edu:
     27}}}
     28Don't forget ':' 
     29You'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.
     30
     31
     32
     33
     34Log into Cypress using your account username and password.
     35{{{
     36local:~ user$ ssh userID@cypress.tulane.edu
     37}}}
     38
     39You must have "id_rsa.pub" on your home directory
     40
     41{{{
     42[user@cypress ~ $] ls id_rsa.pub
     43id_rsa.pub
     44}}}
     45
     46On the remote system, add the contents of your public key file (e.g., ~/id_rsa.pub) to a new line in your ~/.ssh/authorized_keys file; on the command line, enter:
     47{{{
     48 [user@cypress ~ $] cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
     49}}}
     50
     51You may now safely delete the public key file (e.g., ~/id_rsa.pub) on Cypress; on the command line, enter:
     52
     53{{{
     54  rm ~/id_rsa.pub
     55}}}
     56Now you should be able to login Cypress without typing password from next time.