Kategorie: Linux

Generating an SSH key in Linux

To generate SSH keys on Linux use the command ssh-keygen, which by default generates an RSA key for SSH version 2.
The following tutorial on how to generate with a single key command ssh on Linux.


To generate keys, enter the following command:

ssh-keygen -t rsa

After the command should report:

Generating public/private rsa key pair.
Enter file in which to save the key (~/.ssh/id_rsa):

At this point it is possible to choose the location and name of the file where you saved will be key. You can leave the default value shown in parentheses, or give an inch path, because if you give the same name key will be saved in your home directory instead of the user who is logged in the directory .ssh. The selected location appears in two files: private key (default id_rsa) and the public (default id_rsa.pub). When you select the default location to confirm it with the Enter key, should report:

Created directory '~/.ssh'.
Enter passphrase (empty for no passphrase):

At this stage, enter a phrase protecting our key. It should be noted, the phrase is intended to hinder as much as possible access to the private key, therefore one should use combinations of uppercase and lowercase letters, numbers, and punctuation marks. The use of such a scheme will significantly increase safety.

After administration of the security phrase will be asked to repeat it:

Enter same passphrase again:

If these passwords were in line should appear in the following information:

Your identification has been saved in ~/.ssh/id_rsa.
Your public key has been saved in ~/.ssh/id_rsa.pub.
The key fingerprint is:
b9:52:22:97:21:b6:42:61:a6:b9:42:62:af:a9:49:ed użytkownik@komputer
The key's randomart image is:
+--[ RSA 2048]----+
|  +              |
| var/www/html/phpMyAdmin/config.inc.php .             |
|+O. O .          |
|+o.. o o .       |
|o ..o + S        |
|. +. o o .       |
| + .  . .        |
|o..    .         |
|o  E             |
+-----------------+

According to the information private key are located in ~ / .ssh / id_rsa while public location in ~ / .ssh / id_rsa.pub.

Linux

Zobacz komentarze

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu