How to Set Up SSH Trust in Linux

The Secure Shell protocol allows for the connection of machine to another over the Internet. This protocol encrypts data while it travels between the two machines. However, one way cybercriminals trick users into giving away sensitive data over a SSH connection is to make them think they are connecting to the correct server, when in fact they are connecting to a hacker's server masquerading as the correct server. To protect users from such tricks, SSH uses trust files to ensure malicious servers can't pretend to be friendly ones. Editing these files in Linux just requires some command line work.

Instructions

  1. Establishing Initial Trust

    • 1

      Open a command line terminal. Find this application by clicking on your system's main menu, then selecting the "Terminal" option from either the "Accessories" submenu or the "System" submenu.

    • 2

      Access the server through SSH by typing "ssh username@domain" where "username" is your login user name and "domain" is either the domain name or Internet Protocol address of the server. The first time you connect, you will be warned that the domain name is unknown, and the server's public RSA certificate alpha-numeric string will display.

    • 3

      Compare this string to your record of what that string should be. If you own the server, then this string will display the first time you activate SSH. If the two match, then type "yes" to agree to the connection. This will store the server's certificate as trusted on your machine.

    Resetting Keys

    • 4

      Remove a key you have marked as trusted by opening another command line terminal and typing "cd .ssh" into the terminal window. You will need to do this if you change your server's RSA certificate, or the server's administrator tells you that he has changed it over a medium in which you can confirm you are talking to the administrator and not a hacker posing as the administrator.

    • 5

      Open the file which stores the trusted server address or RSA key combinations by typing "nano known_hosts" into the terminal.

    • 6

      Use the arrow keys to select the line for which you want to remove the server address and RSA key combination. Delete the line.

    • 7

      Type "Control+O" to save the changes to the file, then "Control+X" to exit the file.

    • 8

      Repeat the steps in Section 1 to reset your SSH trust to the server's new RSA certificate.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured