Generating SSH keys for the DGX Station involves creating a secure key pair that allows you to authenticate and connect to the DGX Station without entering a password each time. Here are the detailed steps to generate and use SSH keys for the DGX Station:
Step 1: Generate SSH Key Pair
1. Open a Terminal: On Linux or macOS, open a terminal. On Windows, you can use PowerShell or Command Prompt.2. Run `ssh-keygen` Command: Type the following command to generate an SSH key pair. You can specify the type of key and its size for enhanced security:
bash
ssh-keygen -t rsa -b 4096
This command generates a 4096-bit RSA key, which is considered secure. You can also use other types like `ecdsa` or `ed25519` if preferred.
3. Choose Key Location: You will be prompted to enter the file in which to save the key. The default location is `~/.ssh/id_rsa`. You can press Enter to accept this or specify a different path and name, such as `~/.ssh/dgx` for DGX Station keys.
4. Enter Passphrase: You will be asked to enter a passphrase for the key. This adds an extra layer of security. If you don't want a passphrase, you can leave it empty, but it's recommended to use one for security reasons.
5. Confirm Passphrase: Enter the passphrase again to confirm it.
Step 2: Copy Public Key to DGX Station
1. Connect to VPN: Ensure you are connected to the VPN required to access the DGX Station.2. Use `ssh-copy-id`: Run the following command to copy the public key to the DGX Station. Replace `` with your actual username on the DGX Station and `~/.ssh/dgx` with the path to your public key if different:
bash
ssh-copy-id -i ~/.ssh/dgx.pub @172.18.33.4
If you named your key differently, ensure to use the correct public key file name (e.g., `dgx.pub`).
3. Enter Password: You will be prompted to enter your password for the DGX Station. This is a one-time step to set up key-based authentication.
Step 3: Connect Using SSH Keys
1. SSH into DGX Station: Once the public key is copied, you can connect to the DGX Station using SSH without entering a password:bash
ssh -i ~/.ssh/dgx @172.18.33.4
If you used a passphrase during key generation, you might need to enter it when prompted.
By following these steps, you can securely connect to the DGX Station using SSH keys, enhancing both convenience and security.
Citations:
[1] https://hackmd.io/@akshatshah21/vjti-dgx-usage
[2] https://lambdalabs.com/blog/getting-started-with-lambda-cloud-gpu-instances
[3] https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server
[4] https://help.illinoisstate.edu/technology/server/guides/creating-an-ssh-key-using-ssh-keygen
[5] https://www.manualslib.com/manual/2197924/Nvidia-Dgx-Station-A100.html
[6] https://pressable.com/knowledgebase/how-to-create-ssh-keys/
[7] https://www.ssh.com/academy/ssh/keygen
[8] https://dgx-wiki.readthedocs.io/en/latest/docs/environment/DGX.html
[9] https://docs.oracle.com/en/cloud/cloud-at-customer/occ-get-started/generate-ssh-key-pair.html