首页 > 系统相关 >Linux ssh: Could not resolve hostname xxxx: Name or service not known

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

时间:2023-06-26 19:32:01浏览次数:55  
标签:resolve xxxx Name service Could hostname ssh

linux(centos)在配置互信时,出现报错:ssh: Could not resolve hostname xxxx: Name or service not known

出现这种错误是因为系统/etc/hosts中配置的主机名与HOSTNAME的不一致造成。

例如:

/etc/hosts 中这样配置 baoyw-db

hostname中这样配置 baoywdb




标签:resolve,xxxx,Name,service,Could,hostname,ssh
From: https://blog.51cto.com/baoyw/6557119

相关文章

  • odoo中的name_get详解
    name_get是Odoo框架中一个非常重要的方法。它用于定义在Odoo的用户界面上如何显示一个记录的名称。name_get方法通常在许多地方使用,包括下拉选择框,一对多或多对多字段的值,或者任何需要显示模型记录名称的地方。作用:name_get方法返回一个列表,每个列表元素是一个元组,其中包......
  • 三、更改INSTANCE_NAME
    三、更改INSTANCE_NAME1、检查当前的instance_name是wwlSQL>selectinstance_namefromv$instance;INSTANCE_NAME----------------wwl2、创建pfile参数文件SQL>createpfilefromspfile;                             Filecreated.3、关......
  • 【已解决】GO语言开发中调用另一个库报错 cannot refer to unexported name XXXX
    packagemainimport( "fmt" "study_gos/main/kehu")//使用了go.mod//GOPATH;D:\workspace\studys\study_gos//cd/d/workspace/studys/study_gos/src//goenv-wGO111MODULE=on//gomodinitstudy_gos//gomodtidy//跳过goget失败//go......
  • Could not resolve type alias 'com.github.mybatis.helper.page.PageSqlInterceptor'
    报错信息 Couldnotresolvetypealias'com.github.mybatis.helper.page.PageSqlInterceptor'.Cause:java.lang.ClassNotFoundException:Cannotfindclass:com.github.mybatis.helper.page.PageSqlInterceptor 原因报错的位置是 mybatis-config.xml 文件中......
  • 容器基础-- namespace,Cgoup 和 UnionFS
    Namespace什么是Namespace?这里的"namespace"指的是Linuxnamespace技术,它是Linux内核实现的一种隔离方案。简而言之,Linux操作系统能够为不同的进程分配不同的namespace,每个namespace都具有独立的资源分配,从而实现了进程间的隔离。如果你的Linux安装了GCC,可以通过......
  • vue学习第26天 xxxx响应式页面制作
    项目地址:后续添加 1、布局分析nav2列、article7列、aside3列 2、屏幕划分分析 移动端布局总结1、移动端主流方案 2、移动端技术选型1)流式布局(百分比布局)2)flex布局(推荐)3)rem适配布局(推荐)4)响应式布局建议:我们......
  • webdriver通过tag_name定位
    webdriver通过tag_name定位代码示例:#encoding=utf-8importtimefromseleniumimportwebdriverfromselenium.webdriver.common.byimportBydriver=webdriver.Chrome()#打开百度首页driver.get("https://www.baidu.com")#根据名LINK_TEXT获取元素tag_name=dri......
  • 解决git出现fatal: detected dubious ownership in repository at XXXXX的错误
    在window环境下,使用git命令时报错fatal:detecteddubiousownershipinrepositoryatXXXXXX,图片如下解决方法如下添加一行代码gitconfig--global--addsafe.directory"*";......
  • initWithNibName 和 loadNibNamed 的区别
    UIViewControllerinitWithNibName这时候是延迟加载主要代码如下:ShowViewController*showMessage=[[ShowViewControlleralloc]initWithNibName:@"ShowViewController"bundle:nil];self.showViewControllerrelease];这时候是延迟加载,这个View上的控件是nil的self.showVie......
  • webdriver根据class_name获取元素
    webdriver根据class_name获取元素#encoding=utf-8importtimefromseleniumimportwebdriverfromselenium.webdriver.common.byimportBydriver=webdriver.Chrome()#打开百度首页driver.get("https://www.baidu.com")#根据class_name获取元素driver.find_eleme......