windows Putty 错误:无法打开与主机名的连接:主机不存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30545804/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Putty error : Unable to open connection to hostname : Host does not exist
提问by POOJA GUPTA
I am using Putty to ssh into some of the servers that I work on. I am able to connect all others except the one. Although I was able to connect to it before. Whenever I try connecting to it, it always give me error "Unable to open connection on myhost: Host does not exist". My firewall is off and I have even re-installed putty but no help. When I tried connecting to the same server using putty on some other windows system, I was able to do so. I searched regarding this on Internet but did not find much relevant.
我正在使用 Putty ssh 进入我工作的一些服务器。我能够连接除一个之外的所有其他人。虽然我之前能够连接到它。每当我尝试连接到它时,它总是给我错误“无法在 myhost 上打开连接:主机不存在”。我的防火墙关闭了,我什至重新安装了腻子,但没有帮助。当我尝试在其他 Windows 系统上使用 putty 连接到同一台服务器时,我能够这样做。我在互联网上搜索了这个,但没有找到太多相关性。
I am running putty on Windows-7.
我在 Windows-7 上运行腻子。
What can be the possible issue ? Please Help. I have no clue regarding this.
可能的问题是什么?请帮忙。我对此一无所知。
回答by BraveNewMath
For me the problem was with the Url of the reposity. Check remote URL. It must start with [email protected], not https://.
对我来说,问题出在存储库的 URL 上。检查远程 URL。它必须以 [email protected] 开头,而不是 https://。
回答by tercou1
I used nslookup and then used the ip address it gave me to connect and it worked
我使用 nslookup 然后使用它给我的 ip 地址进行连接并且它工作正常
回答by Marged
As I understand you have three computers involved. At the same time one connection is working and the other one fails. So we can exclude that the ssh daemon on your linux box is hanging.
In lack of knowing their real names I will call your computers linuxbox
(this is the computer you want to ssh into), win7ok
(that is the computer that you are able to ssh from using putty) and win7fail
(that obviously is the computer you can't connect from).
据我了解,您涉及三台计算机。同时一个连接正在工作,另一个连接失败。所以我们可以排除你的 linux 机器上的 ssh 守护进程挂起的情况。由于不知道他们的真实姓名,我会打电话给你的电脑linuxbox
(这是你想要 ssh 的电脑),win7ok
(那是你可以使用腻子 sshwin7fail
的电脑)和(这显然是你不能的电脑连接自)。
Please do a tracert
from both Win7 computers:
请tracert
在两台 Win7 计算机上执行以下操作:
tracert linuxbox.your.domain
tracert linuxbox
Add the results to your question as it will help us find out what is happening.
将结果添加到您的问题中,因为它将帮助我们找出正在发生的事情。
Perhaps it is also a good idea to determine the ip address of the linuxbox from win7ok:
或许从win7ok确定linuxbox的ip地址也是个好办法:
ping linuxbox
or
或者
nslookup linuxbox
Then try to connect from win7fail by using the ip address of the target computer, perhaps it is only a DNS problem (which might be as nmap is failing too).
然后尝试使用目标计算机的IP地址从win7fail连接,也许这只是DNS问题(可能是nmap也失败了)。
To make all of this easier to understand for us please provide the real names of the computers as you use them in putty.
为了让我们更容易理解所有这些,请提供您在 Putty 中使用的计算机的真实名称。
回答by ADM-IT
回答by DrMayhem
I just went through this. I have a Cisco VPN I need to use to get through to the Linux machine I wanted to login to and check.
我刚刚经历了这个。我有一个 Cisco VPN,我需要使用它来连接到我想登录并检查的 Linux 机器。
No Putty session would get through using the machines name. An nslookup on the windows machine yielded the correct address. I too connected right in via the ip address. I tried to Google the error and it failed, so I suspected the wireless.
没有 Putty 会话将通过使用机器名称。Windows 机器上的 nslookup 产生了正确的地址。我也通过 IP 地址直接连接。我试图用谷歌搜索错误,但失败了,所以我怀疑是无线的。
Disconnected and reconnected my WiFi and all was good. I did it fast enough that open connections stayed open. And new connections refering to DNS names worked fine.
断开并重新连接我的 WiFi,一切都很好。我做得足够快,打开的连接保持打开状态。并且引用 DNS 名称的新连接运行良好。
Seems like maybe some cached DNS addresses were stale.
似乎某些缓存的 DNS 地址已过时。
回答by muley
Your DNS cache stores the locations (IP addresses) of web servers that contain web pages which you have recently viewed. If the location of the web server changes before the entry in your DNS cache updates, you can no longer access the site.
您的 DNS 缓存存储包含您最近查看的网页的 Web 服务器的位置(IP 地址)。如果在 DNS 缓存中的条目更新之前 Web 服务器的位置发生更改,您将无法再访问该站点。
Following CLI command will do the trick:
以下 CLI 命令可以解决问题:
ipconfig /flushdns