# 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.

1. Create the .ssh subdirectory in your home directory:

    > mkdir ~/.ssh

1. Change working directory to the .ssh subdirectory

    > cd ~/.ssh

1. Copy your keys from your Windows .ssh directory into the Linux .ssh directory using the cp command. In the Linux Debian system, /mnt/c corresponds to c:\ in the Windows system. Let's assume your Windows user name is *user*. Use *ls* command to verify that both parts of your key have been copied into the Linux ~/.ssh folder.

    > cp /mnt/c/users/user/.ssh/id_rsa* .  
    > ls ~/.ssh

    You should see two files, id_rsa and id_rsa.pub

1. 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

1. Use the ssh command to connect to your Capsul's ip address.

    > ssh user@capsul-ip-address

1. 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.

    ![run ssh and copy key fingerprint to clipboard](../res/wsl-ssh-to-capsul/01.png "run ssh and copy key fingerprint to clipboard")

1. Open your Capsul fingerprints file in Notepad. Compare the fingerprint from the Linux command line *ssh* to the fingerprint in Notepad. 
![open fingerprints in notepad and match](../res/wsl-ssh-to-capsul/02.png "open fingerprints in notepad and match")

1. If the fingerprints match, type yes and press enter.
![enter 'yes' if fingerprints match](../res/wsl-ssh-to-capsul/03.png "enter 'yes' if fingerprints match")


1. Close the ssh connection to your Capsul's ip address.

1. Open a ssh connection using your Capsul's domain name instead of the ip address.

    > ssh user@capsul-domain-name
    ![run ssh again using domain name instead of ip address](../res/wsl-ssh-to-capsul/05.png "run ssh again using domain name instead of ip address")

1. 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 in Linux.

1. 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.

[Previous](inst-abra.md)  |  [Next](setup-server.md)  |  [Top](../README.md)  |
