Issue
I have noticed while learning how to setup ssh that lots of stackoverflow posts referred to the file ssh config
being inside of the folder ~/.ssh
but when i look at the same folder in my macbook the files listed are:
created from my last ssh setup
someprivatekey
someprivatekey.pub
known_hosts
now when i inspect the folder cd /etc/ssh/
then i can see the file ssh_config
there.
Is it a normal behavior or should ssh file "ssh_config"
always be located in "~/.ssh"
folder and I have presumably a wrong configuration?
(Sorry if the post sound very elementary, i am learning how to use ssh
)
how to should i setup ssh and the "ssh_config" file correctly?
Solution
The file in /etc/ssh
affects all users on the machine, while the one in ~/.ssh
affects only you. You can find a complete list of the file locations at the end of the ssh manpage (which should be available at your computer by running man ssh
).
Answered By - Ture Pålsson