Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

testing ssh connection error "ssh: Could not resolve hostname hostname: Temporary failure in name resolution"

Tags:

ssh

git-bash

I am following this page on how to test ssh connection.

When i enter this first line:

$ ssh -T git@hostname

I get an error:

ssh: could not resolve hostname 
hostname: Temporary failure in name resolution
like image 366
J-Storm9 Avatar asked Oct 18 '25 20:10

J-Storm9


1 Answers

Make sure you can ping hostname, meaning your DNS does resolve hostname into an IP address.

If not, then SSH would fold back to ~/.ssh/config, looking for a Host hostname entry which would indicate what 'hostname' actually means.

Of course, replace 'hostname' by the actual remote host name you want to reach with this SSH session.

After that, it depends on your OS (Windows, Linux, ...), both for the source and the target.

like image 125
VonC Avatar answered Oct 22 '25 05:10

VonC