habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Create ssh keygen with certain username

32 sec read

Hi, this post will describe about how to generate an SSH key pair with a specific username, we can use the ssh-keygen command with the -C option. The -C option allows you to specify a comment for the public key, which is usually the username or email address of the key owner. For example, to generate an SSH key pair for the user alice, you can run:

ssh-keygen -t rsa -b 4096 -C johndoe
  • -t : Type
  • -C : Comment. Next this use for user login.

This will create a 4096-bit RSA key pair and store them in the ~/.ssh directory. The public key will be saved as ~/.ssh/id_rsa.pub and the private key as ~/.ssh/id_rsa. The public key will have a comment of johndoe at the end of the file. You can then copy the public key to the remote server that you want to access using SSH.

See also  Upgrade Downgrade Unifi via CLI
habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Centos Failed Update Kernel

Today I did a kernel update on my server with Centos 7 OS. At the end of the update process, I found a kernel...
habibzain
1 min read

Easy Fix Missing mirrorlist http://mirrorlist.centos.org on CentOS 7

When running yum update or command that utilize the yum system, errors similar to the following are produced: If you’re encountering issues with the...
habibzain
1 min read

Easy Create Laravel Project with Composer

Requirement Laravel, a popular PHP framework, is renowned for its elegant syntax and robust features, making it a top choice for web developers. One...
habibzain
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss good article from us, get weekly updates in your inbox