ssh: Bad configuration option: usedns
某天突然听到同事说服务器上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的更多相关文章
- Bad configuration option localCommand
command-line: line 0: Bad configuration option: PermitLocalCommand 2011-12-08 14:04:54 标签:Bad confi ...
- 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 ...
- clr enabled Server Configuration Option
在SQL Server中启用CLR,可以执行下面SQL语句: EXEC sp_configure 'clr enabled'; '; RECONFIGURE; Source Code
- linux搭建sftp服务器
转自:http://blog.csdn.net/superswordsman/article/details/49331539 最近工作需要用到sftp服务器,被网上各种方法尤其是权限设置问题搞得晕头 ...
- SSH登录慢解方案 - 关闭UseDNS加速
每次登录SSH时总是要停顿等待一会儿才能连接上,,这是因为OpenSSH服务器有一个DNS查找选项UseDNS默认情况下是打开的. UseDNS 选项打开状态下,当通过终端登录SSH服务器时,服务器端 ...
- SSH服务详解
第1章 SSH服务 1.1 SSH服务协议说明 SSH 是 Secure Shell Protocol 的简写,由 IETF 网络工作小组(Network Working Group )制定:在进行数 ...
- 【转】SSH服务详解
[转]SSH服务详解 第1章 SSH服务 1.1 SSH服务协议说明 SSH 是 Secure Shell Protocol 的简写,由 IETF 网络工作小组(Network Working Gro ...
- (转)SSH服务详解
SSH服务详解 原文:http://www.cnblogs.com/clsn/p/7711494.html 第1章 SSH服务1.1 SSH服务协议说明SSH 是 Secure Shell Proto ...
- Linux下 SSH远程管理服务
第1章 SSH基本概述 1.1 SSH服务协议说明 SSH 是 Secure Shell Protocol 的简写,由 IETF 网络工作小组(Network Working Group )制定 在进 ...
随机推荐
- 关于对多层嵌套的json字符串取目标值的问题
import java.util.HashMap;import java.util.Iterator;import java.util.Map;import net.sf.json.JSONObjec ...
- tomcat 8.xxx ssl使用websocket Failed to close the ServletOutputStream connection cleanly
报错: 2019-09-17 10:30:17.277 default [https-jsse-nio-8110-exec-20] INFO o.a.t.w.s.WsRemoteEndpointImp ...
- Spring Aop(六)——@DeclareParents介绍
转发:https://www.iteye.com/blog/elim-2395410 6 @DeclareParents介绍 @DeclareParents注解也是Aspectj提供的,在使用基于As ...
- 终端复用器tmux基础使用
简介对于经常操作Linux系统的同学来说,远程连接Linux服务器使用最多的工具是SecureCRT或者Xshell,而将此时的环境称为终端环境.Tmux是两个单词的缩写,即“Terminal Mul ...
- vue 文件下载(需调用接口)
methods:{ //下载文件 filerightDown(index,fileName) {//index 接口参数 fileName文件名字 var _this = this; var file ...
- IDEA使用mybatis generator自动生成代码
主要就三步: 1.pom 文件中引入jar包并配置 build 属性 <dependencies> <!-- 自动生产mapper Begin! --> <depende ...
- 【log4j】的学习和理解 + 打印所有 SQL
log4j 1.2 学习和理解 + 打印所有 SQL 一.基本资料 官方文档:http://logging.apache.org/log4j/1.2/manual.html(理解基本概念和其他) lo ...
- NET中的规范标准注释-- XML注释标签讲解
一.摘要 .Net允许开发人员在源代码中插入XML注释,这在多人协作开发的时候显得特别有用. C#解析器可以把代码文件中的这些XML标记提取出来,并作进一步的处理为外部文档. 这篇文章将展示如何使用这 ...
- Aspose.Words提取word文档中的图片文件
/// <summary> /// 提取word中的图片 /// </summary> /// <param name="filePath">w ...
- ajax提交 的编码小结
今天用ajax的post方法提交数据给webservice,由于有email的缘故发现,注册方法调用总是报错,打开报文一看提交的 发现@符号被变成了%40 , abc@126.com 即abc%401 ...