Sunday,Sep19,

Communicate with a remote computer using SSH with RSA

You've probably heard of the remote computer via Telnet to reach the command line used. The biggest problem with Telnet was (and is) security. Since no encryption is used to maintain data between the remote computer and can be any line you find your sensitive data by intercepting communications. More than this, that the transmitted data can be modified by a third party.

Secure Shell (SSH) are not as big a weakness, if configured. What should I domeaning "unless it is configured? Well, the systems used to encrypt and decrypt data encryption systems are mentioned and there are several categories. I mean the configuration needed for RSA, which is very safe. I will not explain the math, but the real deal.

I assume that Linux is used for the server side.

For the client side, I will explain the steps for Windows and Linux.

SSH server-side configurationLinux

RSA, as I said, is an encryption system uses two keys: public and private key. The public key is public and everyone can see them. The private key, on the other side must be kept secret.

If we back to our server configuration. We create the first public key and private. First, log in as normal user (not root). To create your key, type

ssh-keygenT-rsa

Select the default directory for public / private key ENTER. Then you will be asked a passphrase to protect the private key. If your private key is stolen, can not be used if the password is known.

The keys are stored under. Ssh directory by default.

Now login as root. The central configuration file for the SSH daemon in Linux, the file is sshd_config / etc / ssh.

Open the file sshd_config with your favoriteEditor and change the following settings:

AuthorizedKeysFile. Ssh / id_rsa.pub

PasswordAuthentication no

These settings force people to use RSA, prohibits the registration of root and defines the file name, public key, that we face.

Save the file and start the SSH daemon:

service sshd restart

They are made with the server-side configuration. It 's so simple!

SSH client-side configurationLinux

On the server computer, you should inform the public key file / home / gcagrici. / Ssh / id_rsa.pub in the example of our previous steps. You should also copy your private key to each client-server computer from which you plan to connect the remote server and then delete it from the machine, because it requires the private key on the server machine.

Since we are configuring the server computer (completed in our example, test1), we can move thePrivate key file on your computer to our client machine (test2 in our example) from USB storage or other, yes. You should end up with the private key file (id_rsa) below. ssh of your home on the local client machine. Do not forget that this file should be only you and nobody else to read.

Now you're ready to connect! Type the following command:

ssh-i user_hostname

In our example, would

ssh-i/ Home / / remote. Ssh / id_rsa user_hostname or when you go home (this is / home / remote in our example):

user_hostname ssh -i.ssh/id_rsa

You'll get the password for your private key, which you asked to be included when generating the public / private key pair, and that's it!

SSH client-side configuration on Windows

We are a popular and free tool to connect to our server from a Windows PC via SSH: Putty. You mustthree executable files for download from the web of plaster: PuTTY, Pageant and PuTTYgen.

To generate the private key on the server with Putty format must include stucco for the conversion. But first, you copy the private key file (id_rsa) on your Windows PC. Puttygen.exe then run by double clicking on them.

Click on the menu and select Import Conversions Key.

Select the private key file (id_rsa) and enter the passworddefined before.

On the next screen, click the Save button to save the private key private key imported and stucco. You use this key to connect to remote server using Putty.

Now run the file pageant.exe. Pageant is used to keep the password in memory, so no password is required each time to connect to remote servers simultaneously.

Pageant adds an icon on the taskbar. Right-click the icon and choose AddKey. Choose the putty private key file imported from the previous step. Enter your password.

Now putty.exe run. You will need to connect to remote computer. Select SSH and enter the hostname or IP address of the remote server. Click open and voila!

Enter your login name on the remote server. Now you have a secure connection to the remote server runs.

If you have any questions, feel free to ask questions aboutButton at the top right of our site.

Tags : MP3 Player hpwirelessprinter

Danos tu comentario