Skip to main content

Connect Using SSH

Secure Shell Protocol(SSH) is a cryptographic network protocol for operating networked services securely over an unsecured network. This is the most common way to connect to a Compute Blade.

Installing SSH Client

To connect using SSH you will need a SSH client. there are a number of options available:

All of these clients will work, but for this guide we will be using OpenSSH.

To install OpenSSH for Windows run PowerShell as an Administrator. To make sure that OpenSSH is available and not installed, run the following cmdlet:

Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Client*'

The command should return the following output if it is not installed:

Name  : OpenSSH.Client~~~~0.0.1.0
State : NotPresent

Then Run the following cmdlet to install the OpenSSH Client:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

The command should return the following output:

Path          :
Online : True
RestartNeeded : False

Using SSH Command Line Interface

Using the Host name or IP address of the Blade we can use the command line to connect to it

ssh [user@]host-name-or-address

When connecting to a computer for the first time you will be asked if you are sure you want to connect. By typing yes a key fingerprint will be added to the list of known hosts.

ssh uptime@blade
The authenticity of host 'blade (192.168.1.100)' can't be established.
ED25519 key fingerprint is SHA256:10RTKd4AHOBM9lHPf938y4wCl7DiKoZWJAJ+Rcg6Rcg.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Then enter your password

uptime@blade's password:

Once authenticated you will be presented with an active bash terminal.

uptime@blade:~$

Notable Command Line Options

You may need to need to pass options to the SSH command when connecting. Here are some of the most used:

  • -p Port to connect to on the remote host.
  • -l Specifies the user to log in as on the remote machine.

Public Key Authentication

Public key authentication provides cryptographic strength that even extremely long passwords can not offer. With SSH, public key authentication improves security considerably, freeing users from remembering complicated passwords.

Creating Key Pair

To create a key pair the OpenSSh Client includes the command

ssh-keygen
cat ~/.ssh/id_rsa.pub # Append this in ~/.ssh/authorized_keys (Create $HOME/.ssh/authorized_keys if it does not already exist)
ssh -i ~/.ssh/id_rsa <user>@<remoteserver> # To use with your ssh client