Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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 Best 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
Question marked as Best reply

Feb 16, 2021 8:59 AM in response to MTUser2007

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


Feb 16, 2021 6:28 PM in response to PERockwell

Thanks for trying to help me. Your analysis helped me work through the problem, which i found was partially of my own making. On my old system, I used the command to show hidden files and I did it so long ago that I forgot I did it and that is not how Macs work by default. Once I looked for what you suggested, and couldn't find it, it dawned on me that I needed to turn on hidden files on the new Mac. Once I did that it all fell into place. I can see where the keys need to go.

Feb 16, 2021 7:34 AM in response to Barney-15E

I am sorry but I don't understand your answer. It assumes a level of knowledge that I don't have.


So I'll illustrate my difficulty in another way. I am writing this on a MacBook Air that had, past tense, a .ssh folder on it in my user folder. After the upgrades to now Big Sur passwordless login still works from Terminal. I don't why it works or where my keys are.

I've searched this Mac for my keys Ida_rsa, ida_rsa.pub and they aren't found in the search results.


What was once simple on High Sierra is now difficult and complicated on Big Sur.

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 ID.