Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

  • Premium+

What is an RSA key?

It is a generated key, or more specifically an algorithm, with which we further secure entry via ssh.

Obviously a superbly secure password, faster access to ssh (you don't have to type your password every time), better security for ssh logins.

 

Log in to ssh and type:

 

cd /root/.ssh/ && ssh-keygen

 

Then:

 

Key passphrase: (we can leave blank) key encrypting file responsible for RSA

Enter file in which to save the key (/root/.ssh/id_rsa): leave preferably blank (default location, /root/.ssh/id_rsa)

 

Then confirm with enter and enter the command to rename the file:

Spoiler Header (Editable)

mv id_rsa.pub authorized_keys

 

Then enter the command to edit the file and copy its entire contents to a text file on disk (e.g. key.txt):

 

ee id_rsa

 

Download the puttygen.exe program and run it.

Enter the "Conversions" menu and then Import Key like that:

This is the hidden content, please

 

We point to the place of the file into which we pasted the contents of the id_rsa file (in my case key.txt)

After selecting the file, click on the "Save private key" button and save it, to the desktop

 

Once the private key file has been generated, we open Putty.

Create a standard connection by entering the IP, Port.

Then open in the left "tree" Connection --> SSH --> Auth:

This is the hidden content, please

 

In the private key file for the authentication, we indicate the location of the generated file, save the session and open it.

Enter root and if it logs us in, it means that everything has been done successfully.

Now, it would be a good idea to block logins with the usual password, so in the console we type the command to edit the file responsible for ssh configuration:

 

 

ee /etc/ssh/sshd_config

 

We change the relevant lines to such:

 

PasswordAuthentication no
PermitEmptyPasswords no
UsePAM no

 

Restart ssh with the command:

 

/etc/rc.d/sshd restart

 

Done. From now , our server login is more secure

 

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...