All Projects β†’ jirsbek β†’ Ssh Keys In Macos Sierra Keychain

jirsbek / Ssh Keys In Macos Sierra Keychain

Saving SSH keys in macOS Sierra keychain

Projects that are alternatives of or similar to Ssh Keys In Macos Sierra Keychain

Cashier
A self-service CA for OpenSSH
Stars: ✭ 590 (-36.42%)
Mutual labels:  ssh-key, openssh
Awesome Ssh
πŸ’» A curated list of SSH resources.
Stars: ✭ 1,742 (+87.72%)
Mutual labels:  ssh-key, openssh
girltalk
A tool for helping stand up headless C2 for droppables.
Stars: ✭ 16 (-98.28%)
Mutual labels:  openssh
Bastion
πŸ”’Secure Bastion implemented as Docker Container running Alpine Linux with Google Authenticator & DUO MFA support
Stars: ✭ 531 (-42.78%)
Mutual labels:  openssh
Host
Expose your LocalHost with this tool
Stars: ✭ 268 (-71.12%)
Mutual labels:  openssh
jsch
fork of the popular jsch library
Stars: ✭ 127 (-86.31%)
Mutual labels:  openssh
Geofront
Simple SSH key management service
Stars: ✭ 337 (-63.69%)
Mutual labels:  ssh-key
sshame
brute force SSH public-key authentication
Stars: ✭ 43 (-95.37%)
Mutual labels:  ssh-key
Skm
A simple and powerful SSH keys manager
Stars: ✭ 670 (-27.8%)
Mutual labels:  ssh-key
ansible-ssh-keys
Ansible role to manage ssh keys in Debian-like systems
Stars: ✭ 26 (-97.2%)
Mutual labels:  ssh-key
Ssh Permit A38
Central management and deployment for SSH keys
Stars: ✭ 451 (-51.4%)
Mutual labels:  ssh-key
gsh
GSH is an OpenID Connect-compatible authentication system for systems using OpenSSH servers
Stars: ✭ 21 (-97.74%)
Mutual labels:  openssh
custom-ssh-key-buildpack
πŸ”‘ Add an SSH key to you Heroku dyno πŸ”‘
Stars: ✭ 49 (-94.72%)
Mutual labels:  ssh-key
Sharkey
Sharkey is a service for managing certificates for use by OpenSSH
Stars: ✭ 360 (-61.21%)
Mutual labels:  openssh
shim
The Userify Shim (cloud agent)
Stars: ✭ 57 (-93.86%)
Mutual labels:  openssh
Git Tutorials
Git-Tutorials GITεŸΊζœ¬δ½Ώη”¨ζ•™ε­ΈπŸ“
Stars: ✭ 539 (-41.92%)
Mutual labels:  ssh-key
ssh-agent-inject
[Note: Not needed with VS Code anymore.] Forwards the host's ssh-agent into a Docker container on Windows and macOS hosts.
Stars: ✭ 20 (-97.84%)
Mutual labels:  ssh-key
Ssh Vault
🌰 encrypt/decrypt using ssh keys
Stars: ✭ 277 (-70.15%)
Mutual labels:  ssh-key
Sftp
Securely share your files
Stars: ✭ 897 (-3.34%)
Mutual labels:  openssh
edkey
edkey allows you to write ED25519 private keys in the OpenSSH private key format
Stars: ✭ 45 (-95.15%)
Mutual labels:  openssh

Saving SSH keys in macOS Sierra keychain

Source links

Problem

As described in detail on https://openradar.appspot.com/27348363, macOS/OS X till Yosemite used to remember SSH keys added by command ssh-add -K <key>.

Unfortunately this way no longer works. Keys added to the keychain via ssh-add -K are not automatically re-added to the ssh-agent after a reboot. As Apple Developer stated:

"That’s expected. We re-aligned our behavior with the mainstream OpenSSH in this area."

Solutions

Solution 1 (recommended)

Apple updated its Technical Notes to indicate that since 10.12.2, macOS includes version 7.3p1 of OpenSSH and its new behaviors.

In ~/.ssh create config file with the following content:

Host * (asterisk for all hosts or add specific host)
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile <key> (e.g. ~/.ssh/userKey)

Solution 2

After usage of ssh-add -K <key> (it's recommended to use absolute path of keys) call the command ssh-add -A on every startup of macOS.

To automate this, add a .plist with the following content to the path ~/Library/LaunchAgents/:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>ssh-add-a</string>
	<key>ProgramArguments</key>
	<array>
		<string>ssh-add</string>
		<string>-A</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>

<!-- @@@@LingonWhatStart:ssh-add [email protected]@@@LingonWhatEnd -->

Alternatives

  • Create this file with the Lingon app.

  • Use curl to download the .plist file to the stated path:

    curl -o ~/Library/LaunchAgents/ssh.add.a.plist https://raw.githubusercontent.com/jirsbek/SSH-keys-in-macOS-Sierra-keychain/master/ssh.add.a.plist
    

Notes

If you have issues with ssh-add: illegal option -- K after using the ssh-add -K command, you may use the full path of the command /usr/bin/ssh-add.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].