
Generate ssh key using ssh-keygen
In other to generate SSH key(s) follow the below steps,
- Open your command line Terminal (macOS/Linux)
- Type in the command:
ssh-keygen -b 2048 -t rsa
- Enter the file in which to save the SSH key,
- Enter the passphase,
- Now you will be asked to enter the passphrase again,
- Your identification and the public key will now be saved.
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/c2c/.ssh/id_rsa): my_ssh_key
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in my_ssh_key
Your public key has been saved in my_ssh_key.pub
The key fingerprint is:
SHA256:iJcAJMGEjgc+2GC6uYJOXOtDWdD9iDwbTIA4XkWgQ+hg c2c@Desktop-MacBook-Pro.local
The key's randomart image is:
+---[RSA 2048]----+
|X=+.= =. |
|=* = = . |
|E+ * . o |
|+Bo X + . |
|.+o.+ B S |
|+ .o.o |
|.+.. |
|= .. |
|o. .. |
+----[SHA256]-----+
See the contents of the SSH key
% ls -ltrh
total 16
-rw------- 1 code2care staff 1.9K Aug 15 14:41 my_ssh_key
-rw-r--r-- 1 code2care staff 420B Aug 15 14:41 my_ssh_key.pub
% cat my_ssh_key
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHICCCAGYmNyeXB0AAAAGAAAABA6v8bbGe
ZgN9GJjTTsbUFTAAAAEAAXYAEAAAEXAAAAB3NzaC1yc2EAAAADAQABAAABAQC+OaD8KXs4
X+sHrq9w9c/cnsLmj9lh7vq9Ck1P1kOvwuFT72bkdLcW7//sIx9Cjz2RHKlTwaVhLKozO8
JFlMpb2EGNl3trRA0vFs/3RVZRAJqwMbqslough7X4/kltH2qOjiFqGdJPOo6+ewJQtnC9
3TggpDvXeBB5Funm5LqBPSVfrITVfHv39Z1xu1ja4JQFnXV3BAInAvrp8AKO0RMOOF/MCi
KyrE8AlOzlksNRI0aalvpWGfPLjsnyvoWOWckgc77KKQlzxP5f+a65qGMtUrhgMOcd6s9A
PlA//hQFqlkoYaW2TtJoxn+uIP1D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N8pHhlJVc+I5
Ocf7WY0KGAlbalcH3Kejl6cKluPowcIe6YugnhvmwmtxPrhclyA3qk4kCjuI258OcbEBdZ
LWN6nX7ByNtw24afITe8u4dNxTBK2pEGq88e/pJNzwfaoZq9PB1jBtjmSNxJltJ1k1gFmI
wIsRMcSzfRQCtTVTRaVmgd6z4MJhwTrAqoQ0WZh0Oa6z2VQfM/ubo61nIa5sGsjPuC8OWZ
uvZgeWx9eFZ8ZoEKaKBdgkoNjwiN1QfG/suF6/4S3WCTVUXM3o
-----END OPENSSH PRIVATE KEY-----
% cat my_ssh_key.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABXYABAQC+OaD8KXs4X+sHrq9w9c/cnsLmj9lh7
vq9Ck1P1kOvwuFT72bkdLcW7//sIx9Cjz2RHKlTwaVhLKozO8JFlMpb2EGNl3trRA0vFs/3RV
ZRAJqwMbqslough7X4/kltH2qOjiFqGdJPOo6+ewJQtnC93TggpDvXeetq5Funm5LqBPSVfr
ITVfHv39Z1xu1ja4JQFnXV3BAInAvrp8AKO0RMOOF/MCiKyrE8AlOzlksNRI0aalvpWGfPLjsn
yvoWOWckgc77KKQlzxP5f+a65qGMtUrhgMOcd6s9APlA//hQFqlkoYaW2TtJoxn+uIP1D50
nP+s27nJGPA774kZT4e895 c2c@Desktop-MacBook-Air.local
More Posts related to HowTos,
- Fix NVIDIA GeForce Experience ERROR CODE 0x0003
- How to convert byte array to String [Kotlin]
- Unzip a Zip file from Terminal Command
- How to write hello world different languages syntax
- [Error] zsh: command not found: mvn
- How to know the version of OpenSSL
- [Solution] IDEA IntelliJ System.out.println function shortcut (sysout alternative for eclipse IDE)
- The default username and password for RabbitMQ
- ChatGPT Outage: Hmm...something seems to have gone wrong. Maybe try me again in a little bit.
- How to check the version of NodeJS installed
- Gmail Unable to upload because it is a folder or a package (like an application bundle or RTFD document)
- How to remove password from pdf file
- BSNL Broadband upgrades speed to minimum 2MBps for all users 512Kbps 1Mbps
- MongoDB: Failed to connect to 127.0.0.1:27017 reason: Connection refused
- Turn off Focus Mode on Mac
- Steps to Delete or Deactivate Instagram Account
- [IRCTC] Indian railways official eRail API 1.1 for developers to get train info
- CentOS Cannot find a valid baseurl for repo base7x86_64 yum
- Why I see Download pre-built shared indexes in IntelliJ
- Copy file from a remote server to current local directory system using SCP command
- [Fix] Minecraft Error: A JNI error has occurred, please check your installation and try again
- How to install Zsh shell
- Merge multiple zip files without unzipping (extracting)
- How to find someone on Instagram
- How to get an embed code from Vimeo?
More Posts:
- SharePoint 2016 error - Could not find file ManageUserProfileServiceApplicationTenantSimplified.xml - SharePoint
- Error code - 7: There's a more permanent way to sign in to Microsoft Teams - Teams
- Sublime Text 3 Convert Case to Upper, Lower, Title or Swap - Sublime-Text
- Convert Multidimensional Array toString In Java - Java
- PHP header location function not called - PHP
- Show battery percentage on MacBook Menu Bar [Ventura 13] - MacOS
- Test internet speed using macOS Terminal command - MacOS
- iPhone Message: A new iOS update is now available. Please update from the iOS 14 beta. - Apple