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

这个是ssh基本操作的连接,当你配置完ssh之后,然后明明是正确的,然后你使用命令:

ssh  localhost然后出现了

Could not resolve hostname github.com: Name or service not known

等等类似的话,那么说明你忘记了一个配置就是:


/etc/hosts文件的映射:


如图配置就可以了。