Question

Is it somehow possible to access a user's public key files (located in ~/.ssh) in a sandboxed Mac OSX application?

Was it helpful?

Solution

Apple consider SSH keys to be confidential user information. You must ask for permission to access them using NSOpenPanel.

OTHER TIPS

Nope. ~/.ssh is outside your sandbox, so you can't access it unless the user gives you permission (for example, by selecting a file inside it in an NSOpenPanel.)

Note that most keys and certificates are stored in the Keychain on Mac OS X rather than in a dot directory. The Keychain APIs are accessible even within a sandbox. Depending on what you're trying to do, you may be able to accomplish it through the keychain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top