coop-cloud-win-deploy/md/ssh-to-capsul-from-wsl.md

52 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

# 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
2021-08-26 03:53:08 +00:00
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.
2021-08-26 03:53:08 +00:00
> 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.
2021-08-26 03:17:04 +00:00
![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.
2021-08-26 03:17:04 +00:00
![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.
2021-08-26 03:17:04 +00:00
![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.
2021-08-26 03:17:04 +00:00
1. Open a ssh connection using your Capsul's domain name instead of the ip address.
> ssh user@capsul-domain-name
2021-08-26 03:17:04 +00:00
![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")
2021-08-26 03:53:08 +00:00
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.
2021-08-23 04:35:31 +00:00
2021-08-26 03:17:04 +00:00
Now that you've confirmed your WSL2 Linux system can login to your remote Capsul, proceed with the next step.
2021-08-26 03:17:04 +00:00
[Previous](inst-abra.md) | [Next](setup-server.md) | [Top](../README.md) |