Windows - Logging into HPC with ssh

Overview

Objective of this tutorial is to describe and demonstrate the various methods for logging into an HPC system from a computer running the Windows Operating System (OS). This one covers the use of the native Command Prompt to use ssh. By the end of this tutorial you will know how to login to our HPC system using the Windows Command Prompt on Windows.

Introduction

Additionally, after several decades Microsoft finally has a native ssh client AND server on Windows! The client is standard (and is stable) on Windows 10 since 2018 with the 1809 "October Update". If you are using an older version of Windows you will still need to use a SSH client, such as "PuTTY", "MobaXterm" or "Bitvise SSH". You can find the installers by doing a Google search on the package name. See our Tutorial on using MobaXTerm to login to an HPC system.

Using The Command Prompt to Login

Search for Using the Windows Command Prompt

Since ssh is now available on the newest versions of Windows, we can login in a very similar method as you would on a Linux or Mac computer. The main difference is that Windows uses the term ‘Command Prompt’ instead of 'Terminal'. Here are the steps to using ssh with the Windows Command Prompt:

Search for the Command Prompt in the Windows search bar.

You can type the letters ‘cmd’ or ‘Command Prompt’ to find the application.

About the Windows Command Prompt and using the ssh command

There are several different parts of the ssh command but it can be broken down into username, the '@' symbol, and servername. For example, when I first open the Command Prompt on a Windows computer I see:

Microsoft Windows [Version xx.x.xxxxx.xxx] (c) Microsoft Corporation. All rights reserved. C:\Users\johndoe

Where the first part of the Command Prompt shows what version of Windows my computer and then what folder I am in, in this case I am in my home directory C:\Users\johndoe under the 'C' drive.

From here we can now type in our ssh command from the email:

 

Where this is saying that I want to ssh as the user arcc-t01 onto the server @beartooth.arcc.uwyo.edu. If we then hit ‘enter’ on the first time trying to connect we will get message saying the ‘authenticity of the host … can’t be established' and then asks if we ‘are sure we want to continue?’

There are some sensitive information was blocked out in the above image. If yours doesn’t look the exactly same, it is normal.

If we then type ‘yes’ we get taken to a pre-authentication window in our terminal where it says ‘this system requires two-factor authentication’ and that we will need to enter our password and second factor token to login.

If you are unsure how to do this, please see our Tutorial on Using Two-Factor Authentication. After we enter our password and 2FA, we are logged into the system successfully and our prompt in our terminal changes to what we used in our ssh command.

You won’t see any dots in the terminal window as you type your password. This is normal, please hit ‘enter’ after you finish typing your password & 2FA.

Where arcc-t01 is our username and @blog1 is the server we logged into. ‘blog1’ is specifically one of the login nodes on the cluster host beartooth.arcc.uwyo.edu.

[arcc-t01@blog1 ~]$

Now you can use the the HPC system the way you expect provided this works with your intended workflow.

Graphical Applications

With Windows you may have to install another application called Xming before you can run graphical applications over ssh on the Command Prompt. You may want to use a ssh client like MobaXTerm instead of the command prompt if this is the case, or the FastX Client.


Summary

In this tutorial we learned:

  • That Windows now has native support for ssh in the Command Prompt

  • How to find & open the Command Prompt

  • use the ssh command to login to an HPC system


Next Steps

If you find that the Command Prompt isn’t for you, Windows also has the option to run the Windows Subsytem for Linux (WSL), or there are always ssh clients like MobaXTerm that you may find more useful.