The Ops Community ⚙️

Sarah Lean
Sarah Lean

Posted on • Originally published at techielass.com

SSH to a Linux server from Windows 11

SSH to a Linux server from Windows 11

Connecting to a Linux server is a secure method. In the past I have used tools such as PuTTY to connect, but I’ve recently started to use OpenSSH.

In this tutorial I will walk you through the process of installing OpenSSH on your Windows 11 machine, and then show you how to SSH to a Linux server using OpenSSH.

What is OpenSSH?

OpenSSH is a tool that can help you remotely sign-in to computers using the SSH protocol. It encrypts all traffic between the client and the server to avoid eavesdropping, hijacking of the connection and other attacks.

OpenSSH is developed by developers of the OpenBSD Project and is available under a BSD-style licence.

OpenSSH on Windows 11

With the latest builds of Windows 10 and Windows 11 the OpenSSH client is installed by default. It will be located in the directory C:/windows/system32/OpenSSH.

You can check it is installed by opening Settings , and selecting Apps

SSH to a Linux server from Windows 11
Windows Settings - Apps

Then select Optional Features

SSH to a Linux server from Windows 11
Windows Settings - Apps - Optional Features

Now search for OpenSSH under installed features

SSH to a Linux server from Windows 11
Windows Settings - Apps - Optional Features

SSH to a Linux server using OpenSSH and a key file

To connect to a Linux server using OpenSSH here are the steps you need to follow.

Open up your terminal prompt (I am using Windows Terminal)

Navigate to the directory where you have stored your private key file

Type in the connection string:

ssh -i "webserver-keypair.pem" ubuntu@ec2-52-12-77-76.us-west-2.compute.amazonaws.com

Enter fullscreen mode Exit fullscreen mode

And hit enter

💡

_Remember to change the key pair file name and connection string to suit your environment and server. _

You may get a prompt asking you to confirm the authenticity of the server and key file, if you are happy to proceed type in yes and hit enter.

After a few seconds you should see the welcome message confirming you have logged onto the server.

SSH to a Linux server from Windows 11
Connecting to a Linux server with SSH

Logoff

Once you are finished you can type logout to end the connection.

Conclusion

Having OpenSSH built into the latest Windows builds makes it really easy to SSH into your Linux servers without having to install another tool.

Have a go and let me know your thoughts!

Top comments (0)