Secure shell or SSH is a network protocol that is used to facilitate remote connections between a client and a server via the command-line or terminal. For many years, SSH has been defaulted to Linux and UNIX based systems but now readily available in some version of windows.
In this tutorial, we will walk through various methods we can connect to a remote machine using SSH on windows operating system.
Putty is the most popular tool for connecting to SSH on windows and Unix based Machines. Putty is a free, open source SSH client that provides a simple and easy connectivity mechanism for connecting to a remote machine running SSH server daemon.
To start using putty, we need to download it.
- Navigate to the following link and download the latest version of putty client. https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html. You can choose a Putty installer and a standalone ssh client executable.
- Once downloaded, install and launch the application. This will present you with a configuration window where you will provide all the required details of the remote machine. You can either provide a Hostname or IP address of the remote machine you wish to connect to.
- If SSH is running on a custom port apart from the default port
22you will require to specify it on the configuration window as shown below.
If you wish to save the session you are currently connecting to, you can do so by selecting Save on the Saved Sessions Tab
Once you have provided all the details to connect to your machine, click on Open to launch a new SSH session. If its the first time connecting to the machine, Putty will prompt you to confirm the new key fingerprint and proceed with the connection. Ensure you verify the fingerprint first before proceeding.
Putty will then prompt you provide your login details such as username and password to connect to.
Upon successful authentication, you should be dropped into a shell of the remote system as shown:
Another method of connecting to SSH on windows is by using Cygwin. Cygwin is a popular tool used to run Linux and BSD tools on Windows systems. It can also be used as an SSH client on Windows systems.
- First, download Cygwin from: https://cygwin.com/install.html
- Launch the application and follow the provided installation instructions.
- Once installed, launch the application and locate the OpenSSH package under "Net"
Select the dropdown button and select the version you wish to install. Choose the latest one available.
Once the installation has completed, you should have SSH access from your windows command-line.
Another handy tool for connecting via SSH on windows is by using mRemoteNG. mRemoteNG is a powerful tool for connecting to machines using various protocols such as HTTP, FTP, SSH, VNC etc. We will be working with SSH on this tutorial.
- Download and install mRemoteNG from - https://mremoteng.org/download
You can also choose to install it using tools such as chocolaty and powershell.
Launch the application select the Use Recommended Settings option.
On the left hand, you can create new connections to remote machines as well as group the machines according to categories. You can also view saved sessions from tools such as putty.
To create a connection via SSH, Right click the Connections tab and select New Connection. You can rename the connection to easily manage connected machines.
Once you have created a new connection, change the protocol to SSH and provide details such as Hostname/IP, username and password.
- Finally, Click connect to launch a new SSH connection to the remote machine. You can perform tasks such as upload and download files using mRemoteNG.
Those are the three most popular ways to connect to SSH on windows. Although there are other methods to connect to SSH from windows, the above discussed methods are easy and offer effective solution.
Thanks for reading & catch you in the next one.