Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh does not read from ssh config

I have an ssh configuration file as follows

Host default
   User git
   Hostname github.com
   IdentityFile ~/.ssh/id_rsa

Host work
   User git
   Hostname github.com
   IdentityFile ~/.ssh/work

Host para
   User git
   Hostname github.com
   IdentityFile /home/dev/.ssh/para

I do have access for all the github repos and have added public keys

But when I tried to do the following

ssh -T git@default
ssh -T git@para
ssh -T git@work 

It throws an error

ssh: Could not resolve hostname: Name or service not known

I am using ubuntu 20.04 in VMware player

How to fix this issue?

like image 601
Gayan Kalanamith Avatar asked May 24 '26 10:05

Gayan Kalanamith


1 Answers

You can specify the config file like so:

ssh -F ~/.ssh/config
like image 81
merc1er Avatar answered May 26 '26 07:05

merc1er



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!