linux ssh - GSSAPIAuthentication

4 篇文章 0 订阅
【基本介绍】
最近公司搬家,发现合作伙伴的服务器的用ftp工具连接老是timeout。 用linux尝试ssh也相应很久才提示输入密码。

【配置参数】
通过ssh debug发现在尝试gssapi认证的时候会卡很久。
debug2: key: /root/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information



通常情况下我们在连接 OpenSSH服务器的时候假如 UseDNS选项是打开的话,服务器会先根据客户端的 IP地址进行 DNS PTR反向查询出客户端的主机名,然后根据查询出的客户端主机名进行DNS正向A记录查询,并验证是否与原始 IP地址一致,通过此种措施来防止客户端欺骗。平时我们都是动态 IP不会有PTR记录,所以打开此选项也没有太多作用。我们可以通过关闭此功能来提高连接 OpenSSH 服务器的速度。

服务端步骤如下:
编辑配置文件 /etc/ssh/sshd_config
vim /etc/ssh/sshd_config
找到 UseDNS选项,如果没有注释,将其注释
#UseDNS yes
添加
UseDNS no

找到 GSSAPIAuthentication选项,如果没有注释,将其注释
#GSSAPIAuthentication yes
添加
GSSAPIAuthentication no

保存配置文件

重启 OpenSSH服务器
/etc/init.d/sshd restart


【GSSAPIAuthentication】
GSSAPIAuthentication
Specifies whether user authentication based on GSSAPI is allowed. The default is ''no''. Note that this option applies to protocol version 2 only.



【未知】
后面改回原来的设置,一切又正常了,未知!


【参考引用】
[url]http://www.tuicool.com/articles/JbARR3[/url]
[url]http://linux.die.net/man/5/ssh_config[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值