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  How to Remote SSH to Google Cloud VM Instance
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.

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

Virtualbox Change Storage Size

Changing the storage size of a virtual machine in VirtualBox involves a few steps. Here’s a general guide. Backup your Virtual Machine (VM) Before...
habibzain
35 sec read

Easy Setup Logrotate Nginx Ubuntu

Log rotation is an important aspect of managing log files on a Linux system, including those generated by Nginx. Logrotate is a utility that...
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