Skip to content

AIMLOPS Platform Setup Guide SSH Configuration Guide for WSL2

Linux88888 edited this page May 6, 2025 · 1 revision
# AIMLOPS SSH Configuration Guide for WSL2

This guide provides step-by-step instructions for setting up an SSH configuration in WSL2 on Windows 11. Follow these steps to create the necessary `.ssh` folder, move your private SSH key, and secure it.

## Steps to Configure SSH:

1. **Create the `.ssh` Folder**  
   By default, the `.ssh` folder may not exist in WSL2 on Windows 11. To create it, run the following command:
   ```bash
   mkdir ~/.ssh
  1. Navigate to the .ssh Folder
    After creating the folder, move into it:

    cd ~/.ssh
  2. Locate and Copy Your Private Key
    If your private SSH key is in the Downloads folder on Windows, navigate to that directory:

    cd /mnt/c/Users/<YourUsername>/Downloads

    Replace <YourUsername> with your actual Windows username.

    Then, move the private key file to the .ssh folder in WSL2:

    mv <YourFile> ~/.ssh/

    Replace <YourFile> with the name of your SSH private key file (e.g., id_rsa).

  3. Secure the Private Key
    To ensure the private key has the correct permissions, use the following command:

    chmod 600 ~/.ssh/id_rsa

    This command restricts access to the private key, making it readable and writable only by you.

Example:

If your username is JohnDoe and the file name is id_rsa, the commands will look like this:

mkdir ~/.ssh
cd ~/.ssh
cd /mnt/c/Users/JohnDoe/Downloads
mv id_rsa ~/.ssh/
chmod 600 ~/.ssh/id_rsa

By following these steps, you will have successfully set up your SSH configuration in WSL2 on Windows 11. Your private key will be securely stored and ready for use.

Clone this wiki locally