|
Article ID: 230
Last updated: 01 Jun, 2023
Follow the steps below to set up public key authentication. Before You Begin: We highly recommend that you create a ~/.ssh/config file on your local system as described in Setting Up SSH Passthrough before you proceed with these steps. Step 1: Create an SSH Public/Private Key PairTo use public key authentication with the Secure Front Ends (SFEs), you need to have an SSH public/private key pair. If you do not, you can create a SSH public/private key pair by typing the following command and following the prompts:
Your passphrase for the private key must meet NASA password requirements. If you are using a non-Unix system, please consult your SSH documentation. Step 2: Initialize the SSH Public Key on the SFEsCopy the public key file to your ~/.ssh2 directory on each SFE you want to use, as follows (where sfeX represents sfe[6‑8]):
Windows users: The above command with the redirection (i.e., < ~/.ssh/id_rsa.pub) will hang on Windows systems. You can try the following alternative method:
Note: Public keys with embedded forced commands or other constraints will be ignored. To view your existing public keys on sfeX:
To completely replace all existing public keys on sfeX:
To delete one or more public keys on sfeX that contain the string denoted by STRING:
For example, the following would remove the public key(s) containing AAAAB3NzaC1yc2EAAAADAQABAAABAQCw2qCC:
Notes:
You can also invoke the ssh-key-init command when you are already logged into an SFE. In this case, omit the ssh username@sfeX.nas.nasa.gov portion and begin the command line with ssh-key-init. Note that when you include the --add and --set options directly on an SFE, you must paste the keys into the terminal window and then terminate by typing Control-d. Keep in mind that public keys are not currently synchronized between SFEs, so each ssh-key-init invocation is only relevant to the particular sfeX it is run on. To test your public/private key pair:
You will be prompted for both your SecurID passcode and your private key passphrase. TIP: Complete these steps for all four SFEs so you can set up SSH passthrough on each one. This enables you to easily switch from one to another if necessary. For example, if you have any issues connecting to one, you can try connecting to a different one.
Also read
|