Given the following ~/.ssh/config file, why do I get a Permission denied (publickey)
when executing
$ ssh entel.rancher1.internal
When this works:
$ ssh -i ~/.ssh/id_rsa [email protected]
~/.ssh/config
Host *
IdentityFile ~/.ssh/id_rsa
Host entel.rancher1.internal
HostName 172.0.0.4
User devops
IdentityFile ~/.ssh/id_rsa
I've already validated that the permissions are correct:
$ ls -al ~/.ssh
drwx------ dj dj .
-rw------- dj dj config
-rw------- dj dj id_rsa
Question: Why can I not connect to my machine via the ~/.ssh/config file by typing in the HostName, while I can SSH in using my private key with a bare ssh command?