新安装了一个Linux虚拟机,在putty 连接不上虚拟机putty时报 Network error:Connection timed out 错误,求大神帮忙解决

& putty 经典ssh连接管理工具
putty 经典ssh连接管理工具
PuTTY是一个Telnet、SSH、rlogin、纯TCP以及串行接口连接软件。较早的版本仅支持Windows平台,在最近的版本中开始支持各类Unix平台,并打算移植至Mac OS X上。除了官方版本外,有许多第三方的团体或个人将PuTTY移植到其他平台上,像是以Symbian为基础的移动电话。PuTTY为一开放源代码软件,主要由Simon Tatham维护,使用MIT licence授权。目前最新的版本为0.61,修正许多Serial连接功能的问题。
PuTTY是一个Telnet、SSH、rlogin、纯TCP以及串行接口连线软件。较早的版本仅支持Windows平台,在最近的版本中开始支持各类Unix平台,并打算移植至Mac OS X上。除了官方版本外,有许多非官方的团体或个人将PuTTY移植到其他平台上,像是以Symbian为基础的移动电话。[1]
PuTTY为一开放源代码软件,主要由Simon Tatham维护,使用MIT licence。[1]
随着Linux在服务器端应用的普及,Linux系统管理越来越依赖于远程。在各种远程登录工具中,Putty是
出色的工具之一。
Putty是一个免费的、Windows 32平台下的telnet、rlogin和ssh客户端,但是功能丝毫不逊色于商业的telnet类工具。
用它来远程管理Linux十分好用,其主要优点如下:
◆ 完全免费;
◆ 在Windows 9x/NT/2000下运行的都非常好;
◆ 全面支持ssh1和ssh2;
◆ 绿色软件,无需安装,下载后在桌面建个快捷方式即可使用;
◆ 体积很小,仅472KB(0.62 版本);
◆ 操作简单,所有的操作都在一个控制面板中实现。
PuTTY包括了:
支持IPv6连接。
可以控制SSH连接时加密协定的种类。
目前有3DES、AES、Blowfish、DES(不建议使用)及RC4。CLI版本的SCP及SFTP Client,分别叫做pscp与psftp。
自带SSH Forwarding的功能,包括X11 Forwarding。
完全模拟xterm、VT102及ECMA-48终端机的能力。
支持公钥认证。
使用简介:
把Putty下载到机器上,双击putty.exe,就出现如图1的配置界面。
选择&Session&,在&Host Name (or IP address)&输入框中输入欲访问的主机名或IP,比如server1或192.168.9.4。端口号(Port)根据使用的协议有所区别,ssh默认使用22,telnet默认使用23,rlogin默认使用513。
在&Protocol&单选栏中选择使用的协议,一般是telnet或ssh,这取决于服务器提供的服务。
在&Saved Session&输入栏中输入任务的名字,单击&Save&按钮,就可以把任务配置保存起来了。
配置完成后单击&Open&按钮,出现如图2的登录界面,就可以使用Putty连接Linux主机了。
关于putty的一些使用中常见的问题
一、在Windows中使用putty登录FreeBsd系统时,能够输入用户名,但是输入密码后按回车键半天无反应
答:设置过程如下:
<span style="color: #. 在/etc/ssh/sshd_config中添加如下内容,使普通用户可以通过SSH登录:
AllowUsers 普通用户帐号
<span style="color: #. 将希望使用su命令的用户加入到wheel组中,在/etc/group中作如下修改
wheel:*:0:root,普通用户帐号
二、在login as: 后输入用户名, 光标不动。即使输入正确的
密码也是没有反应?
答:这是因为putty不像telnet那样会直接显示密码,而是不显示密码,只要你输入的密码是正确的,
即使不显示只要输完密码后直接回车即可进入,不用在乎光标不动。
当输入密码错误敲下回车时会出现 denice 以提示用户密码错误
三、登录时,提示&Network error:Connection timed out&错误信息?
答:有两种可能性,第一:远程服务器上的SSH服务没有开启;第二:远程主机没有开启。
四、putty终端出现乱码问题。
答:因为客户端与服务器使用的字符集不同,会产生乱码现象,你打开putty-window-Translation-选择UTF-8字符集测试下
在官方网站的FAQ上有提到&PuTTY&这个名字本身并没有任何意义。
PieTTY是以PuTTY为底而发展的派生版本,主要的改进为用户界面及在多语环境(尤其是中日韩语系)的强化。
&&下载地址:请后下载
友情链接:Super User is a question and answer site for computer enthusiasts and power users. It&#39;s 100% free, no registration required.
I have a strange problem: When I'm using PuTTY with SSH connecting to a Linux server hosted in
on my local Windows&7, I often get the error saying "Network error: Software caused connection abort" and then the PuTTY SSH window is inactive. Usually I can login in the server with PuTTY and do something, but after a random time (about one or two minutes) I get that error. And sometimes I even can't login, getting an error saying timeout.
I guess there's something wrong with my VMware Player, because I have another Ubuntu desktop hosted in VMware as a code repository server, and it more often than not has a timeout error when I do an SVN update/commit. However, I also guess Windows&7 has some quirk because the same Ubuntu server hosted in VMware as a code repository works very well when on Windows&Vista! It seems all the bad things happen after I moved from Windows&XP to Windows&Vista and then Windows&7!
What could be the reason for this problem and how can it be fixed?
Supplement:
I did a Google search and applied all methods to help, including:
Enable sshd TCPKeepAlive
Set sshd ClientAliveInterval to 900 and ClientAliveCountMax to 3
Set the PuTTY connection setting 'seconds between keepalives' to 5.
But these all don't work! And the SSH session in PuTTY still breaks after sometime!
I turned off both the Linux server firewall and Windows&7 client firewall, but login still times out! It is really annoying!
It seems sometimes I can log in, but sometimes login times out! I really don't know why. It drives me crazy!
One thing I have to mention is that when I'm using PuTTY SSH connecting to a remote server, and it's all OK!
When I failed to log in, ping failed too! But, how can that happen? I use VMware player to host the Linux server on my local machine!
6,311124576
Putty has a feature which attempts to fix this problem:
Network Error: Software caused connection abort
Start Putty
Load your connection settings if you have them saved
Click on “Connection”
On the section that says "Sending of null packets to keep session active", Changed it to 5 seconds.
300 seconds may be better if network outages are your problem, read below for details.
How keepalives to prevent disconnection with Putty:
Some network routers and firewalls need to keep track of all connections through them. Usually, these firewalls will assume a connection is dead if no data is transferred in either direction after a certain time interval. This can cause PuTTY sessions to be unexpectedly closed by the firewall if no traffic is seen in the session for some time.
The keepalive option (‘Seconds between keepalives’) allows you to configure PuTTY to send data through the session at regular intervals, in a way that does not disrupt the actual terminal session. If you find your firewall is cutting idle connections off, you can try entering a non-zero value in this field. The value is so, for example, if your firewall cuts connections off after ten minutes then you might want to enter 300 seconds (5 minutes) in the box.
Reduce the problem using putty autologin and "screen" tool
Putty cannot handle a crappy wifi that loses connectivity for minutes at a time.
A work around is to use autologin and screen.
It is a non trivial problem for putty to re synchronize your terminal after a minute long loss in internet connection.
You run risks of man in the middle attacks during an outage.
You would have to re-authenticate yourself anyway to make sure.
Putty doesn't impose that on you, it just drops you.
So use autologin so putty can auto login on your behalf.
Generate a private key
on the computer you are putty with.
Paste the public key in your /home/youruser/.ssh/authorized_keys on the server side, on the server that you are using putty go login to.
Make the private key accessible to putty in the putty settings Connection->SSH->Auth
Add the private key by specifying the private key file under: "Private key file for authentication".
Save the putty connection settings.
Then you would be able to double click your connection through putty, and it should take you right in to the terminal without typing username/password.
So now you can hook a login to putty on that connection with a keyboard combination like F6.
So when the wifi goes bad and you get dropped.
You mash down F6 and you're back logged in.
BUT you still lose the state of your terminal!
How to fix that?
Use the "screen" program.
Make a new screen by typing 'screen'.
A new screen is created.
When you get kicked out and auto login, you can reattach to your screen.
Here is a tutorial on how to do that:
It's a hassle to type in screen and reconnect every time you get dropped.
So you can write a script that will "auto bring you back to the last available screen" to make it transparent.
So then when the putty terminal freezes.
It looks like this: You make a snort of contempt, mash down Alt+F4 to close putty, Mash down F6.
And in 6 seconds you are back right where you left off.
Even better solution, in theory
In theory you could script out this entire above process, so the terminal detects when it has been dropped, and does all the above steps for you on restoration of the internet connection.
If anyone knows a program that does this automatically let me know.
It would be neat.
2,02841936
Did you find this question interesting? Try our newsletter
Sign up for our newsletter and get our top new questions delivered to your inbox ().
Subscribed!
Success! Please click the link in the confirmation email to activate your subscription.
Troubleshooting the PuTTY Network Error
Software caused connection abort
Read what PuTTY has to say about the error
This is a generic error produced by the Windows network code when it kills an established connection for some reason. For example, it might happen if you pull the network cable out of the back of an Ethernet-connected computer, or if Windows has any other similar reason to believe the entire network has become unreachable.
Windows also generates this error if it has given up on the machine at the other end of the connection responding to it. If the network between your client and server goes down and your client then tries to send some data, Windows will make several attempts to send the data and will then give up and kill the connection. In particular, this can occur even if you didn't type anything, if you are using SSH-2 and PuTTY attempts a key re-exchange.
(It can also occur if you are using keepalives in your connection. Other people have reported that keepalives fix this error for them. (There are pros and cons of keepalives.))
We are not aware of any reason why this error might occur that would represent a bug in PuTTY. The problem is between you, your Windows system, your network and the remote system.
Try a different SSH client
Most likely the problem exists somewhere between PuTTY and the target SSH server. To provide evidence for this, use a different SSH client like () and see if the problem happens on that as well.
It probably will which will isolate the problem away from PuTTY.
Suspect spotty Internet connection
The problem may be the spotty Internet connection. Internet Connectivity Monitoring the uptime of an Internet connection is a good way of determining if your ISP are losing packets and is to blame for PuTTY going down. Get some software that tests the uptime of an Internet connection. For example, . Frequent and long disconnections from the Internet is a breach of ISP service requirements. If this is the case, it will be difficult to prove it's the ISP's fault, as tech support automatically blames these sorts of issues on your computer, OS, router, and wiring to your home. If you are using cable Internet and living out in the boonies, it could be possible that defective hardware in your neighbor's homes could be sending static on the line for a few seconds/minutes when they first turn it on. Finally, it's possible that there is defective hardware in the ISP's network to your home. The cost to ISPs to replace their hardware is so high, that often times they won't do it unless there are enough subscribers in an area to warrent the cost.
Suspect the wired/wireless router
Are you connecting through a wired/wireless router? How old is it? Your router might be the problem. Old wireless and wired technology can get old and drop connections sporadically and restart them, causing PuTTY to die. Remove these components from the equation and see if that solves the problem. Try a wired connection and/or different router to see if that fixes the problem. I had a Linksys wireless router suffer this slow death and drop connections and restart them.
Suspect the operating system providing the SSH connection
The computer you are connecting to with SSH has a policy for number of seconds to keep SSH connections alive. This number is set low for security reasons, and you could increase it. Where this setting is depends on what operating system you are using that provides SSH.
If you are using PuTTY through a virtual machine
If you are using PuTTY passing through a virtual machine, there may be a policy on the virtual machine which is breaking your SSH connection to the server when it thinks it is inactive. Increasing these values depends on which virtual machine software and operating system you are using.
If the Internet connection is bad, SSH client connection workarounds:
If your ISP provides an unstable connection then you could make the disconnections less painful with "ssh autologin". What you do is generate a public and private key. And you tell your foreign server to automatically let in anyone who provides an accurate private key. It doesn't solve your problem completely, but when the Internet outage happens, all you do is close the window, double click an icon, and you are immediately taken back to your home folder command line without entering a username/password.
This will help you with that:
6,311124576
2,02841936
I worked with
servers from Windows PCs, and I had the same problem with PuTTY. A session didn't last more than 1-5 minutes. I tried to play with PuTTY settings (keepalives, etc.) but it didn't help at all.
Finally I have found the solution for my case.
I've recorded TCP dumps both on the client and the server. I've discovered that during 25-30 seconds before disconnecting there are several retransmissions of TCP segments in the client's dump (both from the client's and from the server's side) and finally PuTTY sends RST and close the session with that error. In the server's dump I didn't see any segments from the client in this period, even RST. It means that time to time no TCP segments from the client are delivered to the server and this period is about 30-60 seconds. I've recorded the case several times and always there were retransmissions and final RST from PuTTY. Probably somewhere on the route packets were dropped by network equipments.
To make a workaround I've increased the maximal number of data retransmissions from the default value 5 up to 16. It could prevent PuTTY from disconnection too fast. The variable is 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpMaxDataRetransmissions'. I've added this variable manually, it wasn't initially defined in the registy of my Windows. It did help! Now I see that PuTTY hangs from time to time, but it always comes back to work.
To fix the problem:
1. Record a TCP dump and look for retransmissions and RST before disconnecting.
2. If you find the same retransmissions/RST segments, adjust number of retries on a server or client side (it depends on the side of RST).
Be careful: changing of TCP settings applies to all software and the OS itself.
6,311124576
The error 10053 WSAECONNABORTED (Software caused connection abort.) is a generic
error that can be emitted due to any number of reasons.
This error can occur when the local network system aborts a connection, such as when Winsock closes an established connection after data retransmission fails (receiver never acknowledges data sent on a datastream socket).
The reasons for this issue can range from defective network cables to simple connectivity loss. It's impossible to offer a single solution.
48.6k25157212
In an elevated command prompt, run the following:
C:\Windows\system32&netsh int tcp show global
Querying active state...
TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State
Chimney Offload State
: automatic
NetDMA State
Direct Cache Acess (DCA)
: disabled
Receive Window Auto-Tuning Level
Add-On Congestion Control Provider
ECN Capability
: disabled
RFC 1323 Timestamps
: disabled
If Receive Window Auto-Tuning Level is normal then you'll get issues. Disable it and then everything should work as it used to:
C:\Windows\system32&netsh int tcp set global autotuninglevel=disabled
Connection tab: keep alive set at "5" seconds and enabled
But more importantly:
Connection -> SSH -> Kex, Max minutes before rekey: "2" (default is 60).
My PuTTY was losing its key after a while, causing the timeout. Dropping that value to "2" minutes solved the problem. I stay connected indefinitely now.
6,311124576
The error Network error: Software caused connection abort from PuTTY is the result if there is an IP address conflict (two or more computers have the same IP address) on the network. (I had this problem with a
that got the same IP address assigned by the
server as some rogue device/computer that was set up manually to use the same IP address.)
In this particular case it could be an IP address conflict locally on the Windows 7 computer or with another device on the network.
can be used to successfully track down this kind of error.
6,311124576
You need to enable TCPKeepAlive on Linux.
It's explained in PuTTy's FAQ on the web site, when you're searching for this error.
105k28243291
If the Virtual Machine is running on your local hardware disable keep alive packets.
I had the same problem with PuTTY after installing a new WLAN router / 3G modem to connect to the Internet. I tried all the keep-alive solutions above - and all those in the configuration menu of my router - to no effect.
Then I remembered something from way back in the 90's when I had a land line phone modem: the MTU (maximum transmission unit), basically the maximum size of data chunks transferred - it had a notable effect on the stability of the connection.
So I checked the configuration of my WLAN router, found the MTU setting and changed it from a fixed value of 1424 to "Auto" (I meant to try a smaller value, but "Auto" sounded even better). After that, I've had no more problems with PuTTY - the connection is now rock solid. I hope this helps at least someone with the "Network error: software caused connection abort" problem.
I ran into same issue either with a
script or GUI console. Finally I found that's related to speed (Internet speed - our server is on the Internet). I moved the script to the different location in the network, different site, and not both GUI and Script went well.
It's been sorted out after lot of analysis and sorting.
6,311124576
protected by &#9830;
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10
on this site.
Would you like to answer one of these
Not the answer you&#39;re looking for?
Browse other questions tagged
Super User works best with JavaScript enabled新安装了一个Linux虚拟机,在连接putty时报 Network error:Connection timed out 错误,求大神帮忙解决_百度知道
新安装了一个Linux虚拟机,在连接putty时报 Network error:Connection timed out 错误,求大神帮忙解决
提问者采纳
网络设置不对吧。先ping一下虚拟机,看通不通?
可以ping通的
ssh装好了吗?关闭防火墙,关闭selinux试试。
把虚拟机重新安装看一遍就好了~~~
提问者评价
来自团队:
其他类似问题
为您推荐:
linux虚拟机的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁两天热门文章
最新推荐文章}

我要回帖

更多关于 linux putty 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信