Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  Install Secure Shell Protocol (SSH) on Windows, macOS, and Linux
Top Scroll

Install Secure Shell Protocol (SSH) on Windows, macOS, and Linux

 3 min

SSH is a cryptographic network protocol that is used to enable a user to login directly to a computer even if the connection is through an insecure network. SSH is primarily used for logins and execution of commands on a remote system.

This guide will offer a step-by-step guide on how to install the SSH on different operating systems and the additional steps to improve the SSH setup on the operating systems, including Windows, macOS, and Linux.

1. Identify Your Operating System

Before installing SSH, it’s important to know which operating system (OS) you’re using because the installation process differs depending on the platform.

  • Windows
  • macOS
  • Linux

2. Check for Pre-Installed SSH

Most of the contemporary operating systems have SSH already included in them. So it’s advisable to confirm before installing it. Here are the commands to check for pre-installed SSH in different OS.

1. Windows

  • Open Command Prompt.
  • Type ssh and click Enter.

If SSH is installed, it will respond with information about SHH commands. 

2. macOS/Linux

  • Open Terminal.
  • Type ssh and press Enter.

SSH comes with most of the modern operating systems, macOS, and Linux distributions. If the command is not recognized, then go ahead with the installation steps for your system.

3. Install SSH

If SSH is not available, follow the right installation steps for installing SSH depending on which operating system you are using.

1. For Windows

You can install SSH on Windows in two ways: either through package managers or directly get the application.

  • Using Chocolatey: Chocolatey is one of the most-used Windows package managers. If it’s installed on your system, you can easily install SSH with a single command:
    • Type the below code and run the command.
    • choco install openssh

It will install a secure shell protocol, and after the installation, reboot your computer system to enable SSH.

  • Using Scoop: Scoop is another installed package manager in Windows. If you have it installed, you can use the following command to install SSH:
    • scoop install openssh
  • Manual Installation: If you prefer manual installation, download the OpenSSH binaries from the official Microsoft documentation. 
    • Open SSH Installation Instructions
    • Read the installation and configuration methodology below to set up SSH on your Windows PC.

2. For macOS

SSH is often a native application for MacOS, although there are cases when it might not be installed. In such a case, the application can be installed via Homebrew—MacOS package manager.

First, ensure Homebrew is installed by running:

 /bin/bash -c "$(curl -fsSL https://(curl -f LSb https : //raw.github.com/Homebrew/install/HEAD/install. sh)

Then, install SSH with the following command:

brew install openssh

3. For Linux

SSH is installed by default on almost all Linux distributions; however, you may find in some cases it is missing, which you can install through your system package manager. The exact command varies depending on your Linux distribution. Here are the commands to install SSH on some of the popular Linux distributions. 

  1. Debian/Ubuntu
sudo apt update
sudo apt install openssh-server
  1. CentOS/RHEL
sudo yum install openssh-server
  1. Fedora
sudo dnf install openssh-server

Once installed, enable and start the SSH service with the following command.

sudo systemctl enable ssh
sudo systemctl start ssh

4. Test Your SSH Installation

After installing SSH and configuring it, you need to confirm that it operates appropriately. 

To test the installation:

First of all, open a terminal in your computer or laptop using the command prompt in Windows or the terminal in MAC and Linux systems.

Try connecting to a remote server by running:

ssh username@server_address

For username, replace the user account, and for server_address, replace the IP address or domain name of the remote server.

If you are connected, your SSH is functioning properly, and you will be asked to enter a password. Or if you establish an SSH key pair, you will be asked to authenticate yourself with that SSH key.

Conclusion

The use of secure shell protocol, commonly referred to as SSH, is a very easy yet effective way of creating a channel of encrypted communication between the local host and a remote server.

SSH is applied to Linux, Windows, or MacOS for secure connections to management and usage of remote systems. However, what most users are not aware of is that it is possible to tweak the settings of an SSH server to meet specific organizational requirements.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.