Benches macOS

3

Accessing keychain from Terminal?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I am wondering if i can access my keychain (with saved passwords) from Terminal, and in this case, SSH?

That would be great, so if it does, i would appreciate if someone would let me know how 🙂

/karlan

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    madconqueror

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    hi karlan

    the shell command to access keychains is called
    security. There's a good man page. Also have a look at

    http://blog.macromates.com/2006/keychain-access-from-shell/

    hope this helps,

    --greg

  2. 0

    karlan

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    security doesn't seem to match my criteria thou.

    I need to access the keychain and read passwords from it when im SSH:ed on, and i get "User interaction is not allowed" etc.

    The app needs a command-line to work properly.

    Any other alternatives?

    Thanks thou for the link, really usefull reading =)

  3. 0

    madconqueror

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    hi karlan

    I'm sorry, I didn't read your question exactly. I don't know of a tool that can access the keychain via ssh directly. You would have to login a user to the console to later allow access to the keychain. Both of this can be done with
    osascript.

    Which app needs a command-line to work properly? What do you want to do?

    --greg