Ruby: Apple/macOS: save your SSH private key password
This documentation is part of the Advanced usages guide. You can view the complete guide here: Going further with your Ruby deployments.
👋 Welcome to the Stackhero documentation!
Stackhero provides a ready-to-use Ruby cloud solution that delivers numerous advantages, including:
- Deploy your application in just a few seconds with a simple
git push.- Use your own domain name and take advantage of automatic configuration of HTTPS certificates for enhanced security.
- Benefit from automatic backups, one-click updates, and clear, transparent, and predictable pricing.
- Enjoy optimal performance and enhanced security thanks to a private, dedicated VM.
Save time and make your life easier: it only takes 5 minutes to try Stackhero's Ruby cloud hosting solution!
If you are using macOS, you might find it inconvenient to type your SSH private key password every time you push your code. Although security is essential, you can improve convenience by securely storing your password in Apple's Keychain.
It can be tempting to remove the password from your SSH private key, but this is not advisable.
Instead, store your key password in Keychain using the following command for a key named id_ed25519:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
After running this command, you should not be prompted for your key password again. If you use an RSA key, substitute id_ed25519 with id_rsa as shown below:
ssh-add --apple-use-keychain ~/.ssh/id_rsa