Recently I ran into such a situation, where my Mac running OS X Lion froze when waking from sleep, showing the log-in prompt but the cursor was locked in place. There are a number of reasons why an SSH connection may not work properly, especially if you are connecting between two different networks where hardware firewalls and routing might need to be contended with however, there also might be instances where failures can happen when you have a basic setup of two systems on the same network. But even with this ease, sometimes establishing a basic connection with SSH may fail. In instances where your display is frozen or blank, or if your system is not accepting input from keyboards, being able to remotely log in and at least run a shutdown command to avoid a hard reset is a beneficial option to have.Īpple makes setting up SSH easy and convenient by just enabling the service in the Sharing system preferences. The last solution is to call command ssh-add -A on every startup of macOS.If you are even slightly familiar with the OS X terminal, then SSH (remote log-in) is a great service to have enabled on a system, especially for troubleshooting purposes. Using a launch agent (non-tested solution) This will only be effective when using terminal. ssh-add -K ~/.ssh/my_private_key &> /dev/null Using a «profile dot file»įor CLI users a partial solution is to add this to your dot files (. You will have to re-enter your passphrase the first time you are using it after a logout or a reboot. In other words, the keys are not added to the agent until you actually use them.įurthermore, this option is FreeBSD specific and will result an error on other Unix-like systems. N.B: This option does not add keys previously saved into the keychain to the agent on boot it adds keys to the agent on use. ssh-add -A Using ssh config fileĪ permanent (and probably the "cleanest") workaround to this behavior consists in using the new SSH option AddKeysToAgent option in your. If you are fine with the behavior and don't want to store your passphrases into keychain you can do it the old way by manually adding keys to the agent: ssh-add -K /path/to/private/keyĪnd to add identities to the agent using any passphrases stored in your keychain. We still can login to remote hosts via ssh BUT ssh keys with passphrase are not forwarded to the host which makes the agent somewhat useless. You can fix this pretty easily by running ssh-add -A in your rc script if you want your keys to always be loaded. We re-aligned our behavior with the mainstream OpenSSH in this area. Unfortunately after upgrading to Sierra this way no longer works and command ssh-add -K in Sierra no longer saves SSH keys in OS's keychain.Įngineering has determined that this issue behaves as intended based on the following information: In previous versions of mac OSX, ssh-agent used to remember the passphrases for the keys added to the keychain (with ssh-add -K) and after a reboot (or logout/login), it automatically picked up the passphrases from the keychain with no extra step and it was perfect ! Indeed right after it our ssh keys ( with passphrases) were not forwarded to the remote hosts anymore. Some of us encountered an issue after upgrading to Mac OS Sierra.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |