2.5 KiB
Use WSL Linux SSH to login to remote Capsule
Previously, we logged into the remote capsule using ssh in a Windows cmd.exe window. Before we can continue, we need to make sure that the Linux distribution inside WSL2 can also login to the remote Capsul using ssh.
-
Create the .ssh subdirectory in your home directory:
mkdir ~/.ssh
-
Change working directory to the .ssh subdirectory
cd ~/.ssh
-
Copy your keys from your Windows .ssh directory into the Linux .ssh directory using the cp command and the Windows C: drive being mounted at /mnt/c. Assuming your Windows user name is user. Verify that both parts of your key have been copied into the Linux ~/.ssh folder with the ls command.
cp /mnt/c/users/user/.ssh/id_rsa* .
You should see two files, id_rsa and id_rsa.pub
-
Change the permissions of the id_rsa file so that only you have read and write rights on it, using the chmod command.
chmod 700 id_rsa
-
Use the ssh command to connect to your Capsul's ip address.
ssh user@capsul-ip-address
-
When you try the ssh command, it will say the authenticity of the host can't be established. Copy the fingerprint from the Linux command window to the clipboard.
-
Open your Capsul fingerprints file in Notepad. Compare the fingerprint from the Linux command line ssh to the fingerprint in Notepad.
-
Close the ssh connection to your Capsul's ip address.
-
Open a ssh connection using your Capsul's domain name instead of the ip address.
-
Again, compare the fingerprint of the ssh command with the fingerprint in the capsul-fingerprints file. If they match, type yes and Enter. This causes the domain name to be added to the list of known hosts.
-
Close the ssh connection to your remote capsule.
Now that you've confirmed your WSL2 Linux system can login to your remote Capsul, proceed with the next step.