某天突然听到同事说服务器上git用不了了,上去一看,确实用不了了,git pull报出了如下错误:

$ git pull
/etc/ssh/ssh_config: line : Bad configuration option: usedns
/etc/ssh/ssh_config: terminating, bad configuration options
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.

看到了是ssh配置导致的错误,并且关键词为:“usedns”,然后想起来,今天是有另一个同事为了加速ssh登陆改了一下这个配置。于是将/etc/ssh/ssh_config中的UseDNS改为了yes,并重启了ssh。

但是很遗憾,问题仍旧存在,于是查看了ssh_config配置手册

$ man ssh_config
NAME
ssh_config — OpenSSH SSH client configuration files SYNOPSIS
~/.ssh/config
/etc/ssh/ssh_config

全局搜索ssh_config发现并没有UseDNS的配置,然后详细的看了下同事更改配置的说明是修改了/etc/ssh/sshd_config,然后再查看sshd_config的手册:

$ man sshd_config
NAME
sshd_config — OpenSSH SSH daemon configuration file SYNOPSIS
/etc/ssh/sshd_config

果然在sshd_config配置中搜索到了UseDNS配置,所以很明显是同事配置各个服务器的时候,手误了,误把sshd_config里的配置改到了ssh_config,进而导致了上述问题。将UseDNS的配置改到了/etc/ssh/ssh_config之中果然就好了。

另外可以说一下,ssh_config和sshd_config的区别:ssh_config和sshd_config都是ssh服务器的配置文件,二者区别在于,前者是针对客户端的配置文件,后者则是针对服务端的配置文件。两个配置文件都允许通过设置不同的选项来改变客户端程序的运行方式。

ssh: Bad configuration option: usedns的更多相关文章

  1. Bad configuration option localCommand

     command-line: line 0: Bad configuration option: PermitLocalCommand 2011-12-08 14:04:54 标签:Bad confi ...

  2. PECL: configuration option "php_ini" is not set to php.ini location

    message similar to: configuration option "php_ini" is not set to php.ini locationYou shoul ...

  3. clr enabled Server Configuration Option

    在SQL Server中启用CLR,可以执行下面SQL语句: EXEC sp_configure 'clr enabled'; '; RECONFIGURE; Source Code

  4. linux搭建sftp服务器

    转自:http://blog.csdn.net/superswordsman/article/details/49331539 最近工作需要用到sftp服务器,被网上各种方法尤其是权限设置问题搞得晕头 ...

  5. SSH登录慢解方案 - 关闭UseDNS加速

    每次登录SSH时总是要停顿等待一会儿才能连接上,,这是因为OpenSSH服务器有一个DNS查找选项UseDNS默认情况下是打开的. UseDNS 选项打开状态下,当通过终端登录SSH服务器时,服务器端 ...

  6. SSH服务详解

    第1章 SSH服务 1.1 SSH服务协议说明 SSH 是 Secure Shell Protocol 的简写,由 IETF 网络工作小组(Network Working Group )制定:在进行数 ...

  7. 【转】SSH服务详解

    [转]SSH服务详解 第1章 SSH服务 1.1 SSH服务协议说明 SSH 是 Secure Shell Protocol 的简写,由 IETF 网络工作小组(Network Working Gro ...

  8. (转)SSH服务详解

    SSH服务详解 原文:http://www.cnblogs.com/clsn/p/7711494.html 第1章 SSH服务1.1 SSH服务协议说明SSH 是 Secure Shell Proto ...

  9. Linux下 SSH远程管理服务

    第1章 SSH基本概述 1.1 SSH服务协议说明 SSH 是 Secure Shell Protocol 的简写,由 IETF 网络工作小组(Network Working Group )制定 在进 ...

随机推荐

  1. mysql大数据量下优化

    1 优化sql和索引2 增加缓存如:redis3 主从复制或主主复制,读写分离4 利用mysql自带分区表5 先做垂直拆分,将一个大系统分为多个小系统,也就是分布式6 水平切分,要选择一个合理的sha ...

  2. gateway启动报错:org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found

    将pom.xml中关于spring-boot-start-web模块的jar依赖去掉. 错误分析: 根据上面描述(Description)中信息了解到GatewayAutoConfiguration这 ...

  3. MYSQL的MYSQLDUMP命令

    1.用mysqldump对MySQL数据库进行数据备份与恢复 下面假设要备份tm这个数据库:Shell>mysqldump -uroot –p123456 tm > tm_050519.s ...

  4. Spring Boot连接DB2查询结果时报错“java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z”的解决办法

    关于在maven项目中如何添加DB2的坐标的详细,见:https://www.cnblogs.com/zifeiy/p/7918554.html Spring Boot项目中的application. ...

  5. linux日常常用命令分析

    日志处理: 测试网络路由: xargs使用方法: tcpdump命令分析: dd 写入磁盘测试 cpu个数: 查看网卡流量 查看端口联通情况,临时加端口 ntpdate同步: 可以取出变动的密码: 导 ...

  6. find the mincost route【无向图最小环】

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1599 Problem Description 杭州有N个景区,景区之间有一些双向的路来连接,现在860 ...

  7. [转帖]IBM开源Power指令集:国产高性能CPU迎来新机遇?

    IBM开源Power指令集:国产高性能CPU迎来新机遇? https://www.cnbeta.com/articles/tech/880971.htm cnbeta的新闻.. 希望高性能CPU 能快 ...

  8. docker中启动2个mysql实列

    一.mac环境安装docker容器 在docker官网中下载docker容器,地址:https://www.docker.com/products/docker-desktop 具体安装教程及设置网络 ...

  9. java-监听器(Listener)

    监听器:用于监听web应用中某些对象.信息的创建.销毁等动作,服务器会自动调用相应的方法进行处理.常用于统计在线人数,初始化系统参数等. Javaweb监听器主要监听对象有ServletContext ...

  10. Kubernetes---Pod状态示例

    ⒈Pod 中只有一个容器并且正在运行,容器成功退出 ·记录事件完成  ·如果restartPolicy为:  Always:重启容器:Pod phase仍为Running  OnFailure:Pod ...