top of page
  • Writer's pictureSophiya Taylor

To Connect a Remote Server Through SSH Key [Latest 2022]

Updated: Apr 15, 2022

If you are facing a problem with communication between one device to another device then you are in the right place scroll down and get the solution.


One important tool to master as a system administrator is SSH Key or Secure Shell is a protocol operated to securely log onto remote systems. It is the most common way to access remote Linux, Windows, or Mac servers.



When most people guide to SSH, it is within the context of connecting from a local computer to a remote server, commonly for administration tasks connected to website hosting.


In this guide, we will examine how to use SSH to connect to a remote system. You can cover the basics of installing a Windows/Linux SSH command-line tool and connecting to a remote server (such as a Linode) over SSH on a local Windows system.


What Is a Remote Server?


Remote servers are operated to host the applications in a centralized location. The remote server is a very general category. It refers to any computer suggesting information to other computers.


Most of the time, this guides to connecting to a server across the internet and this can be for the purpose of obtaining media, information, or really anything you might want to get from another computer remote access server authorizes users to achieve access to files and print services on the LAN from a remote location.


Why Need to Connect a Remote Server?


One of the following is required to connect the remote server with the SSH key-

  • With the help of a remote server, you can handle work from one place to another. It is a very fast and quick process securely.

  • For provides entire visibility to the system administrators of all possible SSH keys in the organization.

  • The function of each SSH key is identified and determined to use the keys effectively.

  • For maintaining access when the user loses or misuses the key.

  • To identify and change the access when the employee leaves the organization.

  • To change or reject the access when the attacker overtakes the key.


How to Connect the Remote Server?


PuTTYkey is a key generator tool for creating pairs of public and private SSH keys. PuTTY is useful in network file transfer application, serial console, and open-source terminal eliminator.


PuTTY is offered the facility of files sharing, manipulating data, etc.SSH, Telnet, SCP, SFTP, Serial, etc., are the various network protocol helped by it. “psftp’ is a command-line tool that allows the transfer of a file securely between computers over SSH connections.


PuTTYgen is very quick, so once you Download PuTTY software. Before connecting, you'll need to install the private portion of the key on your server. Install SSH keys manually install SSH keys on your server instance.



If you are operating a Mac or Linux, you will already have the SSH command available on your device. Each of these is well-supported and whichever you decide to use will come down to preference.


Steps to connect Remote Server through SSH Key


Step 1- In the terminal, enter the following command, replacing [username] with the username of the remote user and [ip-address] with the IP address or domain name of the remote server.


The SSH client attempts to join to the remote server over port 22 (the default SSH port).


ssh [username]@[ip-address]

Note:If the server’s SSH port is something other than 22, it needs to be specified in the SSH command. To do this, use the -p option as shown in the command below. Replace [port-number] with the port number that the remote SSH server is using.


ssh [username]@[ip-address] -p [port-number]

Step 2- When you connect with a server for the first time, the SSH client on Windows 10 prompts you to check and verify the host key’s fingerprint. This is normal and the results in output are the same.


You can verify the fingerprint by following the instructions on verifying the authenticity of a remote server guide.


The authenticity of host ‘example.com (93.184.216.34)’ can't be established.

ECDSA key fingerprint is SHA256:d029f87e3d80f8fd9b1be67c7426b4cc1ff47b4a9d0a84.

Are you sure you want to continue connecting (yes/no)?


Step 3- Accept the prompt by entering "Y or Yes", which results in a one-time notice that is similar to:


Warning: Permanently added 'example' (ECDSA) to the list of known hosts.


Once you have successfully connected, your terminal should be operating the remote shell environment for the server. Your command prompt should now display the username and hostname configured for the server. now, you can run any commands that you have available on that server.


This includes multiple of the basic Linux commands, such as ls, cd, rm, and those covered in Using the Terminal guide. Obtaining to know these commands will help you navigate around your server.


Features of PuTTy Key


Easy to Generate SSH


SSH keys can be automatically generated by the certificate management system or by the system executive manually. The key generated has no date to expire with the system. also supports IP Version 6. The generated key can be stored in the required file when required.


Safeguard Login Credentials


The user employs the login certifications to access the remote system. However, the login credentials like username and passwords are shown as plain text when transmitted over the internet.


Secure Communication Between the Users


The SSH key operates an encryption technique to code encrypt the communication between the users or the systems. The SSH key commands are assessed to encrypt the message leaving the sender and decrypt the message as the receiver receives the original form.


Secure Execution of Remote Command


A System administrator requires to run the same command on a separate system connected to a network. The remote commands are performed by mentioning the systems’ names to deliver the command. It is support Unicode.


All for One and One for All


If the user has multiple accounts to access, each account will have a different username and password. It may be difficult for the users to remember the username and password to access the system. SSH key-based authentication procedure removes the access barrier of using a different password and username. account.


Choose the Desired Function for the Specified User


The user wants to share his account with another user to view a specific function or perform a particular job. An SSH key is also used to allocate the desired task to the assigned user, and other function access is denied to that specific user.


Secure Port Forwarding


Port Forwarding transmits the communication request from one port to another to connect remote computers to specific services or devices with the private network.


The Secure Public Key and Private Keys


The public and private keys operated in the SSH protocol are formed mathematically, and it is hard to break the formula. The Public key is used to encrypt the process, & a private key is used to decrypt the process.


Conclusion


Now that you can connect from your remote server to the SSH key, and save your time but also make the connection even more secure by using SSH key authentication. SSH has remained popular because it is secure, lightweight, and useful in diverse situations. If you have any query to connect the remote server then comment on the below section.

39 views0 comments
bottom of page