MacOS: How to permanently add ssh private key to keychain (2024)

MacOS: How to permanently add ssh private key to keychain (1)

MacOS: How to permanently add ssh private key to keychain

If your private ssh key is secured by passphrase you have to run ssh-add command to add it to keychain. It is a mechanism that allows OSX to load ssh keys on login without passing passphrase each time you want to use the key. You can skip the following step if you key is not secured by passphrase.

Step 1: Add private key to keychain

ssh-add --apple-use-keychain ~/.ssh/<private-key-name>
ssh-add -K ~/.ssh/<private-key-name>

Step 2: Configure ssh to use keychain

The next step is to configure ssh to use keychain for specific hosts or for any hosts depends on your needs. You can do this by editing the ~/.ssh/config file. If the file does not exists you can simply create it. Add the following configuration to the file, or modify existed one.

 Host * UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/<private-key-name>
 Host better-coding.com UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/<private-key-name>

That’s all what I’ve prepared for you in this tutorial, if I helped you, please consider sharing this post to help me gain a wider audience.
Thanks and I hope to see you in my next tutorial.

Tags: macos

You Might Also Like

MacOS: How to permanently add ssh private key to keychain (2024)
Top Articles
Recession-Proof Your Portfolio: Top Picks for the Cautious Canadian
Season 1
Fiskars X27 Kloofbijl - 92 cm | bol
Jail Inquiry | Polk County Sheriff's Office
Manhattan Prep Lsat Forum
Algebra Calculator Mathway
What Are the Best Cal State Schools? | BestColleges
T Mobile Rival Crossword Clue
The Realcaca Girl Leaked
Sprague Brook Park Camping Reservations
Tyrunt
Music Archives | Hotel Grand Bach - Hotel GrandBach
biBERK Business Insurance Provides Essential Insights on Liquor Store Risk Management and Insurance Considerations
Items/Tm/Hm cheats for Pokemon FireRed on GBA
Indiana Immediate Care.webpay.md
Jack Daniels Pop Tarts
Classroom 6x: A Game Changer In The Educational Landscape
ocala cars & trucks - by owner - craigslist
Conan Exiles Thrall Master Build: Best Attributes, Armor, Skills, More
Mzinchaleft
All Obituaries | Buie's Funeral Home | Raeford NC funeral home and cremation
Glenda Mitchell Law Firm: Law Firm Profile
Scout Shop Massapequa
Sea To Dallas Google Flights
Anotherdeadfairy
F45 Training O'fallon Il Photos
Sofia the baddie dog
Page 2383 – Christianity Today
Wood Chipper Rental Menards
Radical Red Ability Pill
Hwy 57 Nursery Michie Tn
Rek Funerals
Little Einsteins Transcript
Greyson Alexander Thorn
Nurofen 400mg Tabletten (24 stuks) | De Online Drogist
Mosley Lane Candles
Account Now Login In
Mg Char Grill
Bozjan Platinum Coins
Whas Golf Card
Supermarkt Amsterdam - Openingstijden, Folder met alle Aanbiedingen
How to Draw a Sailboat: 7 Steps (with Pictures) - wikiHow
Keir Starmer looks to Italy on how to stop migrant boats
Clausen's Car Wash
US-amerikanisches Fernsehen 2023 in Deutschland schauen
Is Ameriprise A Pyramid Scheme
Ghareeb Nawaz Texas Menu
Yale College Confidential 2027
Tacos Diego Hugoton Ks
Where and How to Watch Sound of Freedom | Angel Studios
Latest Posts
Article information

Author: Duane Harber

Last Updated:

Views: 6239

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Duane Harber

Birthday: 1999-10-17

Address: Apt. 404 9899 Magnolia Roads, Port Royceville, ID 78186

Phone: +186911129794335

Job: Human Hospitality Planner

Hobby: Listening to music, Orienteering, Knapping, Dance, Mountain biking, Fishing, Pottery

Introduction: My name is Duane Harber, I am a modern, clever, handsome, fair, agreeable, inexpensive, beautiful person who loves writing and wants to share my knowledge and understanding with you.