某天突然听到同事说服务器上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. C-LODOP的端口和网站的端口

    c-lodop的端口和网站的端口是不同的,不需要修改自己网站的端口.c-lodop32位标准版端口:8000,18000 (http网站)c-lodop32扩展版端口:8000,18000(http网 ...

  2. Mysql按照设计顺序获得某个表的字段名称,字段类型,字段描述!!!!!

    编写sql语句 select column_name,data_type ,column_comment from information_schema.columns where table_nam ...

  3. 【Fiori系列】浅谈SAP Fiori的设计美感与发展历程

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[Fiori系列]浅谈SAP Fiori的设计美 ...

  4. Tracking of Features and Edges

    目录 Joint Tracking of Features and Edges Joint Tracking of Features and Edges 1. LK光流 基本LK光流运动假设: \[ ...

  5. noi openjudge 6044:鸣人和佐助

    http://noi.openjudge.cn/ch0205/6044/ 描述佐助被大蛇丸诱骗走了,鸣人在多少时间内能追上他呢? 已知一张地图(以二维矩阵的形式表示)以及佐助和鸣人的位置.地图上的每个 ...

  6. Java核心1(第三章)

    3.6字符串 子串substring(a,b)方法    第二个参数是不想复制的第一个位置  可以从一个较大的字符串中提取一个子串 3.6.2拼接  Java允许使用+号链接两个字符串 3.6.3不可 ...

  7. [bzoj3060][Poi2012]Tour de Byteotia_并查集

    [Poi2012]Tour de Byteotia 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3060 题解: 这类题有一个套路,就是 ...

  8. 删除重复信息且要保留一条的(roacle的rowid另类用法)

    由于表的主键失效了(disable),导致导入了一些主键重复的数据,想保留唯一的一条, 最后发现其实可以用rowid来实现,不知道算不算是rowid的另类用法. delete /*+ parallel ...

  9. Python 解LeetCode:33. Search in Rotated Sorted Array

    题目描述:在一个旋转数组中查找给定的值,其中旋转数组中不含重复值: 思路: 第一遍二分遍历,找到数组中最小值的索引: 第二遍分别对最小值左右两边的数组进行二分查找: class Solution(ob ...

  10. # 滚动Hash

    滚动Hash 假设字符串\(C=c_1*c_2*...c_m\),定义Hash函数\(H(C)=(C_1*b^{m-1}+C_2*b^{m-2}+...C_m*b^{0})mod\; h\) 从k开始 ...