How to generate a SSH key on Linux Mint 21 vanessa or any other Ubuntu-based Linux distribution via the terminal emulator?
I'm a passionate software developer.
Search for a command to run...
I'm a passionate software developer.
Thanks for dropping by. You can visit all my blog articles if you click on the following link: https://blog.alexandrecalaca.com/archive
.deb file A .deb file is a software package format used primarily by Debian-based Linux distributions, including Debian itself, Ubuntu, and Elementary OS. It serves as a means of packaging and distributing software applications and libraries for easy...
Components Introduction In order to truly understand props in React, we first need to be clear on what components are. A component is a reusable piece of the user interface that encapsulates structure, styling, and behavior. Instead of repeating the ...

Introduction Context By default, Codespace is using the GITHUB_TOKEN env var (the “Codespaces token”), which can’t create repos. It’s necessary to authenticate gh with a token/account that has the right scopes, or create the repo on the web first. Ob...

Solution Here it is: git commit --allow-empty-message -m "" Explanation To create a Git commit without a message, or with an empty message, you can use the --allow-empty-message flag with the git commit command. git commit --allow-empty-message -m "...

Steps Cleanup phase This phase’s goal is to removes existing containers, volumes, networks and images Stop and remove volumes docker compose down --volumes --remove-orphans The previous command stops and removes containers, networks, and default volu...

Steps Stop the service It’s not mandatory, but before uninstalling, it's a good practice to stop any running Docker services. sudo systemctl stop docker Remove docker packages It’s used to completely and forcefully remove a list of specified packag...

Revisited and updated on October 1st, 2023
SSH keys, short for Secure Shell keys, are a pair of cryptographic keys used in secure communication between two computers over a network, typically the internet.
They are commonly used to authenticate and secure remote connections to servers, systems, or other devices. SSH keys consist of two parts: public key and private key.
My articles are constantly evolving, and I welcome any feedback, corrections, broken links, or suggestions you may have. Please don't hesitate to share them with me, and I'll be grateful for your input.
Give me a shout or add me:
shall we?

This step is just to make sure you have Linux Mint or a **Ubuntu-**based Linux distribution.
cat /etc/os-release
lsb_release -a
uname -a
Output

ssh-keygen -t ed25519 -C "your email"
Replace "your email" with your actual email address.
Output

The ssh-keygen is a command-line utility that is used to generate an SSH key pair using the Ed25519 algorithm.
The -t flag specifies the type of key to create, key algorithm to use, and in this case, ed25519 indicates the Ed25519 algorithm.
The -C parameter provides a comment (usually your email address) to help you identify the key later.
You can choose the path and filename.
If you just want to use the default name, press Enter, otherwise, provide the name/path of the file.
Enter file in which to save the key (/home/elitebughunter/.ssh/id_ed25519): /home/elitebughunter/.ssh/ssh_key_mdt
Output
elitebughunter@elitebughunter-linux-mint:~$ ssh-keygen -t ed25519 -C "Linux Mint"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/elitebughunter/.ssh/id_ed25519): /home/elitebughunter/.ssh/ssh_key_mdt
Created directory '/home/elitebughunter/.ssh'.
If you don't want to provide a password, just press Enter
Created directory '/home/elitebughunter/.ssh'.
Enter passphrase (empty for no passphrase):
Output
elitebughunter@elitebughunter-linux-mint:~$ ssh-keygen -t ed25519 -C "Linux Mint"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/elitebughunter/.ssh/id_ed25519): /home/elitebughunter/.ssh/ssh_key_mdt
Created directory '/home/elitebughunter/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/elitebughunter/.ssh/ssh_key_mdt
Your public key has been saved in /home/elitebughunter/.ssh/ssh_key_mdt.pub

ls ~/.ssh/
ssh-agent is a program that acts as a background agent to store and manage your SSH private keys.
It is commonly used on Unix-like operating systems, including Linux and macOS, to facilitate secure and convenient SSH key-based authentication.
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/<personal_key>
The ssh-add command alone should work for adding your SSH private key to the agent.
Just replace <personal_key> with the actual filename of your SSH private key.
With a ssh key called linux_mint_ebh_ssh_key, take a look at how it's going to become:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/linux_mint_ebh_ssh_key
Output

cat ~/.ssh/<personal_key>.pub
Just replace <personal_key> with the actual filename of your SSH private key.
Output
ssh-ed25519 AAZACZNzaZ1lZZI1NZE5ZAAAIOj3BR10R5aZetC7+EY4OIOZuwunQaZww9kxZWdwaZZZ youremail@outlook.com.br
You've made it!

I hope this article has been helpful to you. Please feel free to reach out if you have any questions. Your thoughts, suggestions, and corrections are more than welcome.
By the way, don't hesitate to drop your suggestions for new blog articles.
I look forward to seeing you next time.