我在使用 SSH 时遇到问题。我无法连接到任何东西;每个连接在 SSH2_MSG_SERVICE_ACCEPT RECEIVED 处无限期挂起。我在 OSX 10.6.8 上。
我想是我的 SSH 配置有问题,但我想不通。我在 /usr/bin/ 中安装了 os x 附带的原始 openssh,在 /usr/local/bin/ 中安装了 brewed 安装。我正在使用自制软件 - 这里可能发生了一些冲突吗?
关于解决方案的任何想法或可能导致这种情况的原因?这是我的 ssh_config:
Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa
Port 22
# Protocol 2,1
Cipher 3des
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
Run Code Online (Sandbox Code Playgroud)
您连接的主机(运行sshd服务器的主机,而不是运行ssh客户端的主机)有可能在尝试时挂在此处,然后超时并失败ssh根据其 IP 地址对客户端机器的主机名进行反向 DNS 查找。
一种解决方法是在sshd服务器计算机上ssh编辑 /etc/sshd_config ,而不是在您的客户端计算机上将“UseDNS”设置为“no”。(从您最初编写问题的方式来看,听起来您可能已经在客户端上编辑了该文件,这没有任何区别。)
另一种解决方案是让您的 ISP(或负责您的可公开路由 IP 地址的任何机构)在其 DNS 名称服务器上修复您的 IP 地址的反向 DNS 记录,这些服务器对该块的反向 DNS 记录具有权威性。 IP 地址。换句话说,“让人们可以根据您的 IP 地址找到您的主机名,并确保他们找到的主机名映射回您的 IP 地址”。
| 归档时间: |
|
| 查看次数: |
6107 次 |
| 最近记录: |