Where is the .ssh folder OR where do I put my ssh key so I can use it in Terminal?

I administer (on a basic level) a few VPSs running Linux. I've usually done that by connecting to the VPS via SSH from terminal. In the older version of OS X like High Sierra, on my older MacBook Pro, I could find the .ssh folder in Users, and I could place my key, id_rsa and edit known_hosts.


With the new version of OSX, Big Sur, my keys still work on a MacBook Air I have that was upgraded. ( I see I am know using zsh in Terminal.) But, I have a new-to-me MacBook Air to which I want to add my key. I can't find the .ssh folder anymore. In Finder, I have hit option and looked under the Go menu. I can see the hidden User Library folder, but I can't find anything related to SSH.


How do I get my keys into Terminal on Big Sur?

MacBook Air

Posted on Feb 16, 2021 4:41 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 16, 2021 8:59 AM

For your upgraded MacBook, the keys should be in /Users/<username>/.ssh. Spotlight will not find these files.


For your "new to you" MacBook, the .ssh directory may not exist by default. From your new MacBook, either log into your Linux system using ssh or create the .ssh directory manually. You can then move your key files to the new MacBook from the old one.


As an alternative to try to find those files, open a Terminal window and execute the following command:


find . -name 'id-rsa*' -print


Similar questions

4 replies

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Where is the .ssh folder OR where do I put my ssh key so I can use it in Terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.