How to Connect to Linux Server From Windows
Unlike Linux-based distributions or macOS, Windows does not come with a built-in terminal application that you can use to access the server over SSH. Instead you can use softwares like PowerShell or PuTTY on Windows to login and manage your Linux server. In this tutorial I will be covering SSH login from Windows using PowerShell and PuTTY.
Table of Contents
Windows PowerShell is a command-line tool developed by Microsoft Corporation especially for system administration. If you are using Windows 10 Anniversary Update, you should already have Windows PowerShell pre-installed. However if you don't find PowerShell on your programs list, no worries, you can download and install PowerShell on your computer from Microsoft's official website absolutely free of cost.
Download and Install PowerShell
To download PowerShell on your Windows computer please navigate to this page -> Installing the MSI package -> Select your hardware architecture. After the download is complete run the installer file and follow the on screen instructions to install PowerShell.
Using PowerShell to Connect to SSH
If you have followed the previous tutorial in this series then you already know how to connect to SSH using PowerShell as the procedures are exactly same as Terminal app.
Open PowerShell and type
ssh [email protected] and press enter.
1➜ ~ ssh [email protected]
- Remember to replace
usernamewith the username that you set during Operating System installation. Usually the username is
xxx.xxx.xxx.xxxwith your Server IP.
If you are connecting to the server for the first time you will be asked to grant the key fingerprint. Type
yes and hit enter.
1PS C:\Users\Saif> ssh [email protected] 2The authenticity of host '192.168.68.115 (192.168.68.115)' cant be established. 3ECDSA key fingerprint is SHA256:q34xyhLpvBwD+ELM2Ir0qLYuZXpp/xCDE1I4Vtao8H8. 4Are you sure you want to continue connecting (yes/no)? yes
You will be then prompted to input your password. Type your password and press enter.
1PS C:\Users\Saif> ssh [email protected] 2The authenticity of host '192.168.68.115 (192.168.68.115)' can't be established. 3ECDSA key fingerprint is SHA256:q34xyhLpvBwD+ELM2Ir0qLYuZXpp/xCDE1I4Vtao8H8. 4Are you sure you want to continue connecting (yes/no)? yes 5Warning: Permanently added '192.168.68.115' (ECDSA) to the list of known hosts. 6[email protected]'s password: 7Last login: Sun Sep 11 02:27:01 2022 8[[email protected] ~]#
If you see output similar to the output shown above, congratulations you have successfully logged into your server over SSH.
Here's a video demonstration
PuTTY is a free, lightweight and open-source terminal emulator developed for Microsoft Windows platform. It is world's most popular free SSH client which can be used for multiple network protocols, such as - SSH, Telnet, SCP, rlogin, serial port and raw socket connection. In this post I will be discussing how you can download Putty and connect to your Linux server over SSH through Putty.
Download and Install PuTTY
You can download PuTTY from their official website putty.org -> Download PuTTY -> MSI (‘Windows Installer’) -> Select your hardware architecture. After the download is complete run the installer file and follow the on screen instructions to install Putty.
Using PuTTY to Connect to SSH
After the installation is complete open PuTTY on your computer. You will see an interface similar to the one shown on the screenshot below. Type your Server IP on "Host Name or (IP address)" box and click Open.
If you are connecting to the server for the first time you will be asked to grant the key fingerprint. Click on Accept.
You will be then prompted to enter your username. Type
root (or your username) and hit enter. You will be prompted again to enter your password. Type your password and press enter again.
If you see no error but last login message along with your username and server's hostname, congratulations you have successfully logged into your server over SSH.
This article is a part of a series.
- Part 1: How to Use SSH to Connect to a Linux Server
- Part 2: How to Connect to Linux Server From Mac or Linux
- Part 3: This Article
- Part 4: Use Your Android Phone or Tab to Connect to Linux Server via SSH
- Part 5: How to Connect to SSH on Different Port (Port other than 22)
- Part 6: How to Generate SSH Key And Connect to The Server Without Password