Though discussions both here and on several forums about the fact that the new MacOS Sierra, Private key sites are not kept Keychain after restart.
For server administrators, who use secure SSH connection with authentication key, this is a little awkward. Every time I want to authenticate via SSH / Terminal, I should execute the command: ssh-add -K ~ path / private_key.pemAfter which the Terminal command line to execute connectivity and authentication to managed servers. Usually, execute the command: ssh [email protected]_address.
A simpler solution would be to edit the ~ / .ssh / config file in which to create a kind of alias, both for the authentication key and for the user and hostname.
1. Open the Terminal application on MacOS and execute the command:
sudo nano ~ / .ssh / config
2. Add the following lines:
3. Ctrl + X then Y si Enter to save the changes in config.
For authentication via Terminal, will execute the command line: ssh anyname. Authentication will be done automatically with the "root" user on the hostname and port indicated in the config, using the authentication key indicated in IdentityFile".
You can add as many aliases as you want in the ~ / .ssh / config file. The condition is that at the "Host" line you have different names.