updated smaller collections for manual
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<h1> SSH Remote Connection </h1>
|
||||
|
||||
SSH is a secure protocol used as the primary means of connecting to Linux servers remotely. It provides a text-based interface by spawning a remote shell. After connecting, all commands you type in your local terminal are sent to the remote server and executed there.
|
||||
|
||||
<h2> Table of Contents </h2>
|
||||
|
||||
- [SSH with OpenSSH](./ssh_openssh.md)
|
||||
- [SSH with PuTTY](./ssh_putty.md)
|
||||
- [SSH with WSL](./ssh_wsl.md)
|
||||
- [WireGuard Access](./ssh_wireguard.md)
|
@@ -0,0 +1,281 @@
|
||||
<h1> SSH Remote Connection with OpenSSH </h1>
|
||||
|
||||
<h2> Table of Contents </h2>
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [Main Steps and Prerequisites](#main-steps-and-prerequisites)
|
||||
- [Step-by-Step Process with OpenSSH](#step-by-step-process-with-openssh)
|
||||
- [Linux](#linux)
|
||||
- [SSH into a 3Node with IPv4 on Linux](#ssh-into-a-3node-with-ipv4-on-linux)
|
||||
- [SSH into a 3Node with the Planetary Network on Linux](#ssh-into-a-3node-with-the-planetary-network-on-linux)
|
||||
- [MAC](#mac)
|
||||
- [SSH into a 3Node with IPv4 on MAC](#ssh-into-a-3node-with-ipv4-on-mac)
|
||||
- [SSH into a 3Node with the Planetary Network on MAC](#ssh-into-a-3node-with-the-planetary-network-on-mac)
|
||||
- [Windows](#windows)
|
||||
- [SSH into a 3Node with IPv4 on Windows](#ssh-into-a-3node-with-ipv4-on-windows)
|
||||
- [SSH into a 3Node with the Planetary Network on Windows](#ssh-into-a-3node-with-the-planetary-network-on-windows)
|
||||
- [Questions and Feedback](#questions-and-feedback)
|
||||
|
||||
***
|
||||
|
||||
# Introduction
|
||||
|
||||
In this Threefold Guide, we show how easy it is to deploy a full virtual machine (VM) and SSH into a 3Node with [OpenSSH](https://www.openssh.com/) on Linux, MAC and Windows with both an IPv4 and a Planetary Network connection. To connect to the 3Node with WireGuard, read [this documentation](./ssh_wireguard.md).
|
||||
|
||||
To deploy different workloads, the SSH connection process should be very similar.
|
||||
|
||||
If you have any questions, feel free to write a post on the [Threefold Forum](http://forum.threefold.io/).
|
||||
|
||||
|
||||
# Main Steps and Prerequisites
|
||||
|
||||
Make sure to [read the introduction](../tfgrid3_getstarted.md#get-started---your-first-deployment) before going further.
|
||||
|
||||
The main steps for the whole process are the following:
|
||||
|
||||
* Create an SSH Key pair
|
||||
* Deploy a 3Node
|
||||
* Choose IPv4 or the Planetary Network
|
||||
* SSH into the 3Node
|
||||
* For the Planetary Network, download the Planetary Network Connector
|
||||
|
||||
|
||||
|
||||
# Step-by-Step Process with OpenSSH
|
||||
|
||||
## Linux
|
||||
|
||||
### SSH into a 3Node with IPv4 on Linux
|
||||
|
||||
Here are the steps to SSH into a 3Node with IPv4 on Linux.
|
||||
|
||||
* To create the SSH key pair, write in the terminal
|
||||
* ```
|
||||
ssh-keygen
|
||||
```
|
||||
* Save in default location
|
||||
* Write a password (optional)
|
||||
* To see the public key, write in the terminal
|
||||
* ```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
* Select and copy the public key when needed
|
||||
* To deploy a full VM
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select IPv4 in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Copy the IPv4 address
|
||||
* Open the terminal, write the following with the deployment address and write **yes** to confirm
|
||||
* ```
|
||||
ssh root@IPv4_address
|
||||
```
|
||||
|
||||
You now have an SSH connection on Linux with IPv4.
|
||||
|
||||
|
||||
|
||||
### SSH into a 3Node with the Planetary Network on Linux
|
||||
|
||||
Here are the steps to SSH into a 3Node with the Planetary Network on Linux.
|
||||
|
||||
* Set a [Planetary Network connection](../planetarynetwork.md)
|
||||
* To create the SSH key pair, write in the terminal
|
||||
* ```
|
||||
ssh-keygen
|
||||
```
|
||||
* Save in default location
|
||||
* Write a password (optional)
|
||||
* To see the public key, write in the terminal
|
||||
* ```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
* Select and copy the public key when needed
|
||||
* To deploy a full VM
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select Planetary Network in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Copy the Planetary Network address
|
||||
* Open the terminal, write the following with the deployment address and write **yes** to confirm
|
||||
* ```
|
||||
ssh root@planetary_network_address
|
||||
```
|
||||
|
||||
You now have an SSH connection on Linux with the Planetary Network.
|
||||
|
||||
|
||||
|
||||
## MAC
|
||||
|
||||
### SSH into a 3Node with IPv4 on MAC
|
||||
|
||||
Here are the steps to SSH into a 3Node with IPv4 on MAC.
|
||||
|
||||
* To create the SSH key pair, in the terminal write
|
||||
* ```
|
||||
ssh-keygen
|
||||
```
|
||||
* Save in default location
|
||||
* Write a password (optional)
|
||||
* To see the public key, write in the terminal
|
||||
* ```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
* Select and copy the public key when needed
|
||||
* To deploy a full VM
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select IPv4 in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Copy the IPv4 address
|
||||
* Open the terminal, write the following with the deployment address and write **yes** to confirm
|
||||
* ```
|
||||
ssh root@IPv4_address
|
||||
```
|
||||
|
||||
You now have an SSH connection on MAC with IPv4.
|
||||
|
||||
|
||||
|
||||
### SSH into a 3Node with the Planetary Network on MAC
|
||||
|
||||
Here are the steps to SSH into a 3Node with the Planetary Network on MAC.
|
||||
|
||||
* Set a [Planetary Network connection](../planetarynetwork.md)
|
||||
* To create the SSH key pair, write in the terminal
|
||||
* ```
|
||||
ssh-keygen
|
||||
```
|
||||
* Save in default location
|
||||
* Write a password (optional)
|
||||
* To see the public key, write in the terminal
|
||||
* ```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
* Select and copy the public key when needed
|
||||
* To deploy a full VM
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select Planetary Network in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Copy the Planetary Network address
|
||||
* Open the terminal, write the following with the deployment address and write **yes** to confirm
|
||||
* ```
|
||||
ssh root@planetary_network_address
|
||||
```
|
||||
|
||||
You now have an SSH connection on MAC with the Planetary Network.
|
||||
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
### SSH into a 3Node with IPv4 on Windows
|
||||
|
||||
* To download OpenSSH client and OpenSSH server
|
||||
* Open the `Settings` and select `Apps`
|
||||
* Click `Apps & Features`
|
||||
* Click `Optional Features`
|
||||
* Verifiy if OpenSSH Client and OpenSSH Server are there
|
||||
* If not
|
||||
* Click `Add a feature`
|
||||
* Search OpenSSH
|
||||
* Install OpenSSH Client and OpenSSH Server
|
||||
* To create the SSH key pair, open `PowerShell` and write
|
||||
* ```
|
||||
ssh-keygen
|
||||
```
|
||||
* Save in default location
|
||||
* Write a password (optional)
|
||||
* To see the public key, write in `PowerShell`
|
||||
* ```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
* Select and copy the public key when needed
|
||||
* To deploy a full VM
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select IPv4 in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Copy the IPv4 address
|
||||
* Open `PowerShell`, write the following with the deployment address and write **yes** to confirm
|
||||
* ```
|
||||
ssh root@IPv4_address
|
||||
```
|
||||
|
||||
You now have an SSH connection on Window with IPv4.
|
||||
|
||||
|
||||
|
||||
### SSH into a 3Node with the Planetary Network on Windows
|
||||
|
||||
* Set a [Planetary Network connection](../planetarynetwork.md)
|
||||
* To download OpenSSH client and OpenSSH server
|
||||
* Open the `Settings` and select `Apps`
|
||||
* Click `Apps & Features`
|
||||
* Click `Optional Features`
|
||||
* Verifiy if OpenSSH Client and OpenSSH Server are there
|
||||
* If not
|
||||
* Click `Add a feature`
|
||||
* Search OpenSSH
|
||||
* Install OpenSSH Client and OpenSSH Server
|
||||
* To create the SSH key pair, open `PowerShell` and write
|
||||
* ```
|
||||
ssh-keygen
|
||||
```
|
||||
* Save in default location
|
||||
* Write a password (optional)
|
||||
* To see the public key, write in `PowerShell`
|
||||
* ```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
* Select and copy the public key when needed
|
||||
* To deploy a full VM
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select Planetary Network address in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Copy the Planetary Network address
|
||||
* Open `PowerShell`, write the following with the deployment address and write **yes** to confirm
|
||||
* ```
|
||||
ssh root@planetary_network_address
|
||||
```
|
||||
|
||||
You now have an SSH connection on Window with the Planetary Network.
|
||||
|
||||
|
||||
|
||||
# Questions and Feedback
|
||||
|
||||
If you have any questions, let us know by writing a post on the [Threefold Forum](http://forum.threefold.io/).
|
@@ -0,0 +1,81 @@
|
||||
<h1> SSH Remote Connection with PuTTY </h1>
|
||||
|
||||
<h2> Table of Contents </h2>
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [Main Steps and Prerequisites](#main-steps-and-prerequisites)
|
||||
- [SSH with PuTTY on Windows](#ssh-with-putty-on-windows)
|
||||
- [Questions and Feedback](#questions-and-feedback)
|
||||
|
||||
***
|
||||
|
||||
## Introduction
|
||||
|
||||
In this Threefold Guide, we show how easy it is to deploy a full virtual machine (VM) and SSH into a 3Node on Windows with [PuTTY](https://www.putty.org/).
|
||||
|
||||
To deploy different workloads, the SSH connection process should be very similar.
|
||||
|
||||
If you have any questions, feel free to write a post on the [Threefold Forum](http://forum.threefold.io/).
|
||||
|
||||
|
||||
|
||||
## Main Steps and Prerequisites
|
||||
|
||||
Make sure to [read the introduction](../tfgrid3_getstarted.md#get-started---your-first-deployment) before going further.
|
||||
|
||||
The main steps for the whole process are the following:
|
||||
|
||||
* Create an SSH Key pair
|
||||
* Deploy a 3Node
|
||||
* Choose IPv4 or the Planetary Network
|
||||
* SSH into the 3Node
|
||||
* For the Planetary Network, set a [Planetary Network connection](../planetarynetwork.md)
|
||||
|
||||
|
||||
|
||||
## SSH with PuTTY on Windows
|
||||
|
||||
Here are the main steps to SSH into a full VM using PuTTY on a Windows machine.
|
||||
|
||||
* Download [PuTTY](https://www.putty.org/)
|
||||
* You can download the Windows Installer in .msi format [here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
|
||||
* This will add both PuTTY and PuTTYgen to your computer
|
||||
* Make sure that you have the latest version of PuTTY to avoid potential issues
|
||||
* Generate an SSH key pair
|
||||
* Open PuTTYgen
|
||||
* In `Parameters`, you can set the type of key to `RSA` or to `EdDSA`
|
||||
* Click on `Generate`
|
||||
* Add a passphrase for your private key (optional)
|
||||
* Take note of the generated SSH public key
|
||||
* You will need to paste it to the Dashboard later
|
||||
* Click `Save private key`
|
||||
* To deploy a full VM
|
||||
* Go to the following section of the [Threefold Dashboard](https://dashboard.grid.tf/): Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select IPv4 in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
* To SSH into the VM once the 3Node is deployed
|
||||
* Take note of the IPv4 address
|
||||
* Connect to the full VM with PuTTY
|
||||
* Open PuTTY
|
||||
* Go to the section `Session`
|
||||
* Add the VM IPv4 address under `Host Name (or IP address)`
|
||||
* Make sure `Connection type` is set to `SSH`
|
||||
* Go to the section `Connection` -> `SSH` -> `Auth` -> `Credentials`
|
||||
* Under `Private key file for authentication`, click on `Browse...`
|
||||
* Look for the generated SSH private key in .ppk format and click `Open`
|
||||
* In the main `PuTTY` window, click `Open`
|
||||
* In the PuTTY terminal window, enter `root` as the login parameter
|
||||
* Enter the passphrase for the private key if you set one
|
||||
|
||||
You now have an SSH connection on Windows using PuTTY.
|
||||
|
||||
|
||||
|
||||
## Questions and Feedback
|
||||
|
||||
If you have any questions, let us know by writing a post on the [Threefold Forum](http://forum.threefold.io/).
|
@@ -0,0 +1,129 @@
|
||||
<h1> WireGuard Access </h1>
|
||||
|
||||
<h2> Table of Contents </h2>
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Deploy a Weblet with WireGuard Access](#deploy-a-weblet-with-wireguard-access)
|
||||
- [Install WireGuard](#install-wireguard)
|
||||
- [Set the WireGuard Configurations](#set-the-wireguard-configurations)
|
||||
- [Linux and MAC](#linux-and-mac)
|
||||
- [Windows](#windows)
|
||||
- [Test the WireGuard Connection](#test-the-wireguard-connection)
|
||||
- [SSH into the Deployment with Wireguard](#ssh-into-the-deployment-with-wireguard)
|
||||
- [Questions and Feedback](#questions-and-feedback)
|
||||
|
||||
***
|
||||
|
||||
# Introduction
|
||||
|
||||
In this Threefold Guide, we show how to set up [WireGuard](https://www.wireguard.com/) to access a 3Node deployment with an SSH connection.
|
||||
|
||||
Note that WireGuard provides the connection to the 3Node deployment. It is up to you to decide which SSH client you want to use. This means that the steps to SSH into a 3Node deployment will be similar to the steps proposed in the guides for [Open-SSH](./ssh_openssh.md), [PuTTy](ssh_putty.md) and [WSL](./ssh_wsl.md). Please refer to [this documentation](./ssh_guide.md) if you have any questions concerning SSH clients. The main difference will be that we connect to the 3Node deployment using a WireGuard connection instead of an IPv4 or a Planetary Network connection.
|
||||
|
||||
|
||||
|
||||
# Prerequisites
|
||||
|
||||
Make sure to [read the introduction](../tfgrid3_getstarted.md#get-started---your-first-deployment) before going further.
|
||||
|
||||
* SSH client of your choice
|
||||
* [Open-SSH](./ssh_openssh.md)
|
||||
* [PuTTy](ssh_putty.md)
|
||||
* [WSL](./ssh_wsl.md)
|
||||
|
||||
|
||||
|
||||
# Deploy a Weblet with WireGuard Access
|
||||
|
||||
For this guide on WireGuard access, we deploy a [Full VM](../../../dashboard/solutions/fullVm.md). Note that the whole process is similar with other types of ThreeFold weblets on the Dashboard.
|
||||
|
||||
* On the [Threefold Dashboard](https://dashboard.grid.tf/), go to: Deploy -> Virtual Machines -> Full Virtual Machine
|
||||
* Choose the parameters you want
|
||||
* Minimum CPU: 1 vCore
|
||||
* Minimum Memory: 512 Mb
|
||||
* Minimum Disk Size: 15 Gb
|
||||
* Select `Add WireGuard Access` in `Network`
|
||||
* In `Node Selection`, click on `Load Nodes`
|
||||
* Click `Deploy`
|
||||
|
||||
Once the Full VM is deployed, a window named **Details** will appear. You will need to take note of the **WireGuard Config** to set the WireGuard configurations and the **WireGuard IP** to SSH into the deployment.
|
||||
|
||||
> Note: At anytime, you can open the **Details** window by clicking on the button **Show Details** under **Actions** on the Dashboard weblet page.
|
||||
|
||||
|
||||
|
||||
# Install WireGuard
|
||||
|
||||
To install WireGuard, please refer to the official [WireGuard installation documentation](https://www.wireguard.com/install/).
|
||||
|
||||
|
||||
|
||||
# Set the WireGuard Configurations
|
||||
|
||||
When it comes to setting the WireGuard configurations, the steps are similar for Linux and MAC, but differ slightly for Windows. For Linux and MAC, we will be using the CLI. For Windows, we will be using the WireGuard GUI app.
|
||||
|
||||
## Linux and MAC
|
||||
|
||||
To set the WireGuard connection on Linux or MAC, create a WireGuard configuration file and run WireGuard via the command line:
|
||||
|
||||
* Copy the content **WireGuard Config** from the Dashboard **Details** window
|
||||
* Paste the content to a file with the extension `.conf` (e.g. **wg.conf**) in the directory `/etc/wireguard`
|
||||
* ```
|
||||
sudo nano /etc/wireguard/wg.conf
|
||||
```
|
||||
* Start WireGuard with the command **wg-quick** and, as a parameter, pass the configuration file without the extension (e.g. *wg.conf -> wg*)
|
||||
* ```
|
||||
wg-quick up wg
|
||||
```
|
||||
* Note that you can also specify a config file by path, stored in any location
|
||||
* ```
|
||||
wg-quick up /etc/wireguard/wg.conf
|
||||
```
|
||||
* If you want to stop the WireGuard service, you can write the following in the terminal
|
||||
* ```
|
||||
wg-quick down wg
|
||||
```
|
||||
|
||||
> Note: If it doesn't work and you already did a WireGuard connection with the same file, write on the terminal `wg-quick down wg`, then `wg-quick up wg` to reset the connection with new configurations.
|
||||
|
||||
## Windows
|
||||
|
||||
To set the WireGuard connection on Windows, add and activate a tunnel with the WireGuard app:
|
||||
|
||||
* Open the WireGuard GUI app
|
||||
* Click on **Add Tunnel** and then **Add empty tunnel**
|
||||
* Choose a name for the tunnel
|
||||
* Erase the content of the main window and paste the content **WireGuard Config** from the Dashboard **Details** window
|
||||
* Click **Save** and then click on **Activate**.
|
||||
|
||||
|
||||
|
||||
|
||||
# Test the WireGuard Connection
|
||||
|
||||
As a test, you can [ping](../../computer_it_basics/cli_scripts_basics.md#test-the-network-connectivity-of-a-domain-or-an-ip-address-with-ping) the virtual IP address of the VM to make sure the WireGuard connection is properly established. Make sure to replace `VM_WireGuard_IP` with the proper WireGuard IP address:
|
||||
|
||||
* Ping the deployment
|
||||
* ```
|
||||
ping VM_WireGuard_IP
|
||||
```
|
||||
|
||||
|
||||
|
||||
# SSH into the Deployment with Wireguard
|
||||
|
||||
To SSH into the deployment with Wireguard, use the **WireGuard IP** shown in the Dashboard **Details** window.
|
||||
|
||||
* SSH into the deployment
|
||||
* ```
|
||||
ssh root@VM_WireGuard_IP
|
||||
```
|
||||
|
||||
You now have access to the deployment over a WireGuard SSH connection.
|
||||
|
||||
|
||||
|
||||
# Questions and Feedback
|
||||
|
||||
If you have any questions, let us know by writing a post on the [Threefold Forum](http://forum.threefold.io/) or by reaching out to the [ThreeFold Grid Tester Community](https://t.me/threefoldtesting) on Telegram.
|
@@ -0,0 +1,89 @@
|
||||
<h1> SSH Remote Connection with WSL </h1>
|
||||
|
||||
<h2> Table of Contents </h2>
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [SSH Key Generation](#ssh-key-generation)
|
||||
- [Connect to Remote Host with SSH](#connect-to-remote-host-with-ssh)
|
||||
- [Enable Port 22 in Windows Firewall](#enable-port-22-in-windows-firewall)
|
||||
- [Questions and Feedback](#questions-and-feedback)
|
||||
|
||||
***
|
||||
|
||||
## Introduction
|
||||
|
||||
In this Threefold Guide, we show how easy it is to SSH into a 3node on Windows with [Windows Subsystem for Linux (WSL)](https://ubuntu.com/wsl).
|
||||
|
||||
If you have any questions, feel free to write a post on the [Threefold Forum](http://forum.threefold.io/).
|
||||
|
||||
## SSH Key Generation
|
||||
|
||||
Make sure SSH is installed by entering following command at the command prompt:
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
```sh
|
||||
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 `no passphrase`).
|
||||
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:
|
||||
|
||||
```sh
|
||||
\\wsl$\\Ubuntu\home\<username>\.ssh\
|
||||
```
|
||||
|
||||
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 username@example.com
|
||||
```
|
||||
|
||||
Copying the entire text you can specify your public SSH key while connecting your wallet before deploying a VM.
|
||||
|
||||
## Connect to Remote Host with SSH
|
||||
|
||||
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:
|
||||
|
||||
```sh
|
||||
ssh username@remote_IP_host
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```sh
|
||||
ssh -i ~/.ssh/keys/my_key username@remote_IP_host
|
||||
```
|
||||
|
||||
## Enable Port 22 in Windows Firewall
|
||||
|
||||
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 `New Rule…` under `Inbound Rules` to create a new firewall rule
|
||||
- under `Rule Type` select `Port`
|
||||
- under `Protocol and Ports` select `TCP`, `Specific local Ports` and enter `22`
|
||||
- under `Action` select `Allow the connection`
|
||||
- under `Profile` make sure to only select `Domain` and `Private`
|
||||
|
||||
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.
|
||||
|
||||
- under `Name`
|
||||
- Name: `SSH Server`
|
||||
- Description: `SSH Server`
|
||||
|
||||
## Questions and Feedback
|
||||
|
||||
If you have any questions, let us know by writing a post on the [Threefold Forum](http://forum.threefold.io/).
|
Reference in New Issue
Block a user