- SSH Key Generation
- Connect to Remote Host with SSH
- Enable Port 22 in Windows Firewall
- Questions and Feedback
In this Threefold Guide, we show how easy it is to SSH into a 3node on Windows with Windows Subsystem for Linux (WSL).
If you have any questions, feel free to write a post on the Threefold Forum.
Make sure SSH is installed by entering following command at the command prompt:
sudo apt install openssh-client
The key generation process is identical to the process on a native Linux or Ubuntu installation. With SSH installed, run the SSH key generator by typing the following:
ssh-keygen -t rsa
Then choose the key name and passphrase or simply press return twice to accept the default values (
key name = id_rsa and
When the process has finished, the private key and the public key can be found in the
~/.ssh directory accessible from the Ubuntu terminal.
You can also access the key from Windows file manager in the following folder:
Your private key will be generated using the default name (
id_rsa) or the filename you specified.
The corresponding public key will be generated using the same filename but with a
.pub extension added.
If you open the public key in a text editor it should contain something similar to this:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNqqi1mHLnryb1FdbePrSZQdmXRZxGZbo0gTfglysq6KMNUNY2VhzmYN9JYW39yNtjhVxqfW6ewc+eHiL+IRRM1P5ecDAaL3V0ou6ecSurU+t9DR4114mzNJ5SqNxMgiJzbXdhR+j55GjfXdk0FyzxM3a5qpVcGZEXiAzGzhHytUV51+YGnuLGaZ37nebh3UlYC+KJev4MYIVww0tWmY+9GniRSQlgLLUQZ+FcBUjaqhwqVqsHe4F/woW1IHe7mfm63GXyBavVc+llrEzRbMO111MogZUcoWDI9w7UIm8ZOTnhJsk7jhJzG2GpSXZHmly/a/buFaaFnmfZ4MYPkgJD email@example.com
Copying the entire text you can specify your public SSH key while connecting your wallet before deploying a VM.
With the SSH key you should be able to SSH to your account on the remote system from the computer that has your private key using the following command:
If the private key you're using does not have the default name, or is not stored in the default path (not
~/.ssh/id_rsa), you must explicitly invoke it!
On the SSH command line add the
-i flag and the path to your private key.
For example, to invoke the private key
my_key, stored in the
~/.ssh/keys directory, when connecting to your account on a remote host, enter:
ssh -i ~/.ssh/keys/my_key username@remote_IP_host
The port 22 is used for Secure Shell (SSH) communication and allows remote administration access to the VM. Sometimes it needs and can be unblocked as follows:
- open Windows Firewall Advance Settings
- click on
Inbound Rulesto create a new firewall rule
Protocol and Portsselect
Specific local Portsand enter
Allow the connection
Profilemake sure to only select
NB: do not select
Public unless you absolutely require a direct connection form the outside world.
This is not recommend especially for portable device (Laptop, Tablets) that connect to random Wi-fi hotspots.
If you have any questions, let us know by writing a post on the Threefold Forum.