What is SSH? | How to Install and Use SSH Server on Windows 10

In today’s world, remote jobs are becoming increasingly popular, and remote access such as SSH is critical. We must use such secure protocols. Such a protocol provides a safe and encrypted connection for remote server management.

In this article, we will look at the details of the SSH or Secure Shell protocol. We will briefly examine its history, security, and authentication methods. Finally, we will install SSH Server on Windows 10 to make a remote connection.

How to Install SSH Server on Windows 10

What is SSH Protocol?

SSH, or Secure Shell, is a way to control and change your remote servers over the internet.

The SSH (Secure Shell) protocol we use for encrypted data transmission uses 22 port numbers. Thus, it provides machine control management by providing remote connection.

They created this protocol as a secure backup connection for unencrypted telnet. This means we encrypt all communications to the remote server. However, it uses some safe and secure encryption techniques.

It is the name of the program that implements it and is used to access remote devices over the network. It allows us to fully manage the computer through a command interpreter. Therefore, if we have an SSH server running (on Unix and Windows systems), it can redirect X traffic to execute graphics programs.

In addition to connecting to other machines, SSH allows us to copy data securely. This allows us to simulate both single files and encrypted FTP sessions. It also allows us to manage RSA keys and pass them through the data channel from another application to avoid writing keys when connecting to devices.

SSH Security

SSH works the same way as telnet. The primary difference is that SSH uses encryption methods that make information traveling on media unreadable.

At the same time, no third party can find the username and password of the connection or the texts throughout the entire session.

It is possible to attack such systems with REPLAY attacks and thus change information between targets.

SSH History

At first, there were only r commands based on the rlogin program, which worked similarly to telnet.

The first version of the SSH protocol was free. However, Tatu Ylönen changed it and licensed it. Thus, the company SSH Communications Security was born. As a result, he offered it free for local and academic use. Apart from these, he requested payment for usage.

They proposed it in draft form at the IETF in 1997. So they made this two years after the first version.

In early 1999, they began writing a version of OpenBSH that would become an excellent implementation called OpenSSH.

SSH Protocol Authentication

Password Authentication

SSH allows the user to authenticate using the regular Unix password. The only difference is that it ensures that the password never travels clearly over the network. On the other hand, if we use SSH to exchange telnet, rlogin, or FTP, we will avoid the danger of possible “sniffers” of our password on the network.

However, we’ll still be at risk of password “dictionary attacks.” If someone gets into the /etc/passwd file, it’s easy for them to find passwords made up of common words.

To make sure this doesn’t happen, the administrator needs to keep the /etc/passwd file safe. And users should always use strong passwords to stay protected.

Public Key Authentication

The other way to authenticate uses something called a public/private key system, also known as an asymmetric key. It works with a pair of keys:

  1. A public key that it copies to all the servers we want to connect to.
  2. It is a private key that only we have. It encrypts this key with a password for additional security.

These two keys have an essential feature. It decrypts the text encrypted with the public key using only the private key.

Let’s see how this feature applies to the authentication process:

  1. The server sends us a message that we need to return encrypted with our private key.
  2. The server decrypts the reply message using our public key.
  3. The server compares the message obtained with the original text; if they match, the server will see us as authentication correctly.

Of course, you don’t have to think about all this when you’re using the system. It would help if you typed in your password when the program tells you to. But the tricky part is getting our public key to the server. Right now, there’s no automatic way to do it, so we have to do it manually.

The big plus with this way of authenticating is that if someone hacks into the server, all they can get is our public key. They can’t touch our private key. So, as long as we have a strong password guarding our private key, there’s no risk to us. Even if someone gets their hands on it, they can’t use it.

It has a secondary advantage if we connect from a Unix machine. It uses an authentication agent to prevent the password from being typed on every connection.

The biggest drawback of public key authentication is the pre-configuration phase, which is cumbersome. The steps to follow are:

  1. Creation of keys.
  2. Propagation of the public key.
  3. Selection of the key pair

Connecting to a Remote Server

We can make a remote SSH connection from a Unix/Linux-type client. For example, to access the server, type the following command in a console:

$ ssh example.com

If you want to connect as root to the remote server, type this. However, in this connection type, as clients, we are like other users.

$ ssh -l root example.com

It transfers data from the client to the device, authenticating a remote user. It then provides a mechanism to forward it back to the client.

So, you have installed an SSH server on your computer. Next, you need to use SSH Client to access your server over LAN or WAN.

Let’s say you established a connection to a server on the network from a remote location. In this case, you transfer your data with a robust encryption algorithm.

Secure data transfer occurs over TCP using the SSH protocol. If you want to access the host from a remote location, you need to configure the TCP/22 Port on your ADSL Modem or Router.

Is SSH Connection Secure?

This connection type uses an SSL certificate for data security.

Here’s an example: when you go to a website, you might notice a little green icon in the top left corner. That icon means the website has an SSL certificate, and it’s safe to send your information there. It simply protects your data both when sending and receiving.

How to Install SSH Server on Windows Computer

We defined the Secure Shell protocol. Now, let’s look at how to install SSH on Windows operating systems.

In our previous articles, we examined the telnet protocol. We enabled telnet Client from Windows Features on Windows 7,8,8.1 and Windows 10. However, we cannot simply enable SSH Client on Windows from Windows Features.

Therefore, we need a 3rd party program like Putty to establish a connection to the server.

If we compare this protocol with telnet, you can see that it is much more secure.

To run an SSH server on your Windows computer, we need two programs. These are OpenSSH and Putty software.

Putty Download
OpenSSH Download

Download and install OpenSSH and Putty programs on your computer. Then, first, install the Windows 10 virtual machine on your virtualization program.

Steps:

To use the VMware virtual machine as a server, we will install and configure OpenSSH. For SSH server installation, follow the steps below.

Step 1

Look at the IP address of your computer’s network adapter.

Network Connection Details

Step 2

Configure the network settings of the Windows 10 VM as VMnet4/Bridged. After this, check the IP address that the machine received from the DHCP server.

Virtual Machine Network Adapter Configuration

Step 3

Now, we need to configure the network adapter setting of the Windows 10 VM. So check this in Virtual Network Editor.

Virtual Network Editor

Step 4

In VMware Virtual Network Editor, you can create VMnet4 or a new VMnet. Check that you have set the VMnet4 adapter card to Bridged.

VMnet / Bridged

Step 5

Copy the OpenSSH program you downloaded to your computer and send it to the VM. Then, run the setupssh.exe file as an administrator to install.

Installing the Software

Step 6

Select the language of the program to be installed and click OK.

Please Select a Language

Step 7

Now, the OpenSSH program is preparing for installation.

Starting the Setup

Step 8

In the OpenSSH installation window, click Next.

Setup Wizard

Step 9

Afterward, accept the OpenSSH license agreement.

Accepting License Agreement

Step 10

In the Components window, select the Server option.

Choose Components

Step 11

In the installation location window, leave the default settings.

Choose Install Location

Step 12

In the Select Start menu folder, hit the Next button.

Choose Start Menu Folder

Step 13

In the Run as LOCAL_SYSTEM window, select this setting.

Choose Account Under Which to Execute SSHD

Step 14

We have specified that the default port number for the SSH connection is 22.

Choose Port for SSHD

Step 15

It will generate a key for a secure connection. Continue by selecting the default setting here.

Choose Key Size for Key Generation

Step 16

In the User Setup window, continue by selecting Local Users.

Choose User Type for SSHD

Step 17

Wait while installing OpenSSH on Windows 10.

Installing OpenSSH Server Software

Step 18

After the OpenSSH installation is complete, go to the next step.

Completing Installation

Step 19

After installing it, you must create a new user for the customer.

Open Computer Management to create a new user.

Computer Management

Step 20

In the Computer Management window, click Users, then Right-click on the free space.

Configuring a New User in Windows

Step 21

When the user creation window opens, click New User here.

New User

Step 22

After configuring a new user, password, and description, click the Create button.

Password Never Expired

Step 23

After creating a new user for the client, click Close to close the window.

User Must Change Password at Next Login

Step 24

Double-click SSHUser to make an administrator.

Editing User

Step 25

Click the Add button on the Membership tab to continue.

Adding the User to a Group

Step 26

In the Select Group window, click the Advanced button at the bottom.

Select Groups

Step 27

You will then click Find to search for groups on the operating system.

Find Now

Step 28

Select the Administrator account and click OK.

Selecting Administrator Group

Step 29

In the SSHUser Properties window, click OK again.

User Properties

Step 30

After making the user a member of the Administrator group, click the OK button.

Saving the Settings

Step 31

Now, we will use the Putty program to connect to the Server from the Host PC. Putty will provide us with an SSH Client service—Double-click Putty to open it.

Putty.exe

Step 32

After opening Putty, type the IP address of the VM (OpenSSH Server) and click the Open button.

Configuring PuTTY

Step 33

You can examine the connection to the OpenSSH Server from the image below.

Login as:

Step 34

Type the SSHUser user name that you created on the virtual machine.

Typing Username

Step 35

Type the password of SSHUser and press Enter.

Server Connection

Step 36

You have successfully connected to the SSH Server using Putty!

Checking the Directory

Step 37

To obtain the hostname of the server, use the “hostname” command.

Hostname Command

Step 38

You can also check your Hostname through Windows 10 OpenSSH Server.

Windows Properties

Step 39

Run the “md FolderName” command to create a new folder on the Server.

md FolderName

Step 40

Go to the virtual machine and check the C: drive to make sure you have created a new folder.

C: Drive

How to Use the Secure Shell Protocol ⇒ Video

To install and configure the OpenSSH Server on your computer or VMware virtual machine, you can watch the video below and subscribe to our YouTube channel to support us!

Frequently Asked Questions About SSH (FAQ)

  1. What is SSH, and why is it used?
Thanks to the Secure Shell protocol, we can connect to our remote machines securely. By remote, I mean servers, routers, or other devices we manage. Thus, we can execute commands on our respective host from the remote location. At the same time, we can transfer files securely.
  1. How does SSH work?
The secure transfer protocol authenticates users during connection. But while doing this, it encrypts the data. Meanwhile, it uses public and private keys as encryption key pairs. In short, it matches these private keys during data transfer. Thus, it creates a safe way for users to access the server.
  1. What is the distinction between SSH and SSL?
The SSL protocol works at the network level to secure web traffic. On the other hand, SSL comes into play when you connect to an e-commerce site, for example. Thus, when you use your credit card information, it encrypts the data between the browser and the server.
  1. How to use SSH command in Windows?
Using the SSH command in Windows may seem complicated, but it is simple. First, open PowerShell or Command Prompt and type “ssh (username)@(hostname).” As soon as you press enter, you will see (username). This is your username on the remote machine. Host (computer name) is the IP address or domain name of the machine.
After providing the required information, type and enter your password on the remote machine. However, keep in mind that at this stage, when you type the password, it will not appear on the screen. Finally, after establishing a connection, you can execute commands as if you were in front of the physical device.

Conclusion

In this article, we reviewed how to install a free SSH Server on Microsoft Win 7, 8, 8.1, and 10 operating systems.

Using OpenSSH, you can securely connect to your server from a remote location and transfer files. Thanks for following us!

Add a Comment

Your email address will not be published. Required fields are marked *