I'm trying to setup SSH on my computer but not sure how to access the ~/.ssh/config file. From github's website they mention this file has to be modified but I'm not sure where its located or how to modify it.
On Github:
If you're using macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain.
Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa
To see your . ssh folder in the Finder, press Command+Shift+G, then enter ~/. ssh .
Where is the SSH configuration file? On macOS systems, the configuration file is found at “/private/etc/ssh/ssh_config,” which is symlinked to “/etc/ssh/ssh_config” for compatibility. A second, user-specific ssh_config is found at “~/.
The ssh program on a host receives its configuration from either the command line or from configuration files ~/. ssh/config and /etc/ssh/ssh_config . Command-line options take precedence over configuration files. The user-specific configuration file ~/.
Start Terminal and create the ~/.ssh
directory if it doesn't exist:
mkdir -p ~/.ssh
Now go into the directory:
cd ~/.ssh
Now open the file config
with the default editor:
open -t config
If it says that file doesn't exist, create it with:
touch config
and try opening again:
open -t config
When you edit the file, make sure it is "Plain Text" using the menu at the top of the screen and clicking Format->Make Plain Text.
Set the permissions as instructed in your tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With