3、putty工具常见设置

转载自:https://www.cnblogs.com/hdk1993/p/4769072.htmlhtml

 

Putty是一个免费小巧的Win32平台下的telnet,rlogin和ssh客户端。 它的主程序不到1M, 是彻底免费的telnet和ssh客户端工具。putty 不须要安装,下载下来解压后建立一个桌面快捷方式便可。数据库

用Putty 已经很长时间了,但一直被一个问题困扰,有时候是懒得去弄,反正也不怎么碍事,今天小研究了下,把这个问题解决了,内心也舒服了。服务器

Putty官网的下载地址:session

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlapp

主界面:ssh

咱们要链接Linux/unix 系统时,只需写上IP地址便可。 固然若是保存下来,下次使用时直接选中在Load 一下就能够了。 仍是比较方便。ide

可是Putty 的一些默认配置并非十分的合理:工具

图片中标注出来是我修改后的参数。 Lines of scrollback 这个默认只有200,也就是说只能往上翻200行,这个基本不能知足修改。 我加了2个零。 如今查看就方便不少。 还有就是窗口的大小。 默认的也不是很理想。 在查某些SQL的时候,一行被断成2行,查看也不是很方便。 我把它设大点。 因此一行就能够显示完,方便查看。post

还有就是颜色,我喜欢黑色和绿色的搭配,看这比较舒服:网站

这是修改以后登录的效果。

可是如今没有保存,此次使用是正常的,下次打开的时候,又返回默认设置了。 以前一直没搞清楚这点。因此凑合用了很长时间。 保存的步骤以下:

1. 修改配置

2. 点session 返回主界面

3. 选中要保存的session。 这里是10.85.10.1

4. 点save。

5. Ok ,下次在登录10.85.10.1时,就是本身喜欢的配置了。 固然若是修改Default Settings, 之后新建的session都是修改以后的session了。

 

长时间没有操做putty就会断开链接是怎么回事?

转载自: https://www.cnblogs.com/yfish/p/6376048.html

 

 

 

seconds between keepalives 设置为10就行了, 这个值有什么含义,服务器为了节省资源采起了一些措施,其中一条就是若是检测一个会话(session)几分钟或者几小时没有数据流入或者流出就会断开这个连接,占着茅坑不拉屎就是说这种状况,设置了putty中keepalive这个值以后好比是10,那putty每隔10秒就给服务器发送一个空数据包,以此来表示我还没拉完屎呢?这样厕所看管员就不会把咱们踢出去了。

我这里找到了putty官方网站中关于keepalive的说明:

4.13 The Connection panel

The Connection panel allows you to configure options that apply to more than one type of connection.

4.13.1 Using keepalives to prevent disconnection

If you find your sessions are closing unexpectedly (most often with ‘Connection reset by peer’) after they have been idle for a while, you might want to try using this option.

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 measured in seconds; 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.

Note that keepalives are not always helpful. They help if you have a firewall which drops your connection after an idle period; but if the network between you and the server suffers from breaks in connectivity then keepalives can actually make things worse. If a session is idle, and connectivity is temporarily lost between the endpoints, but the connectivity is restored before either side tries to send anything, then there will be no problem - neither endpoint will notice that anything was wrong. However, if one side does send something during the break, it will repeatedly try to re-send, and eventually give up and abandon the connection. Then when connectivity is restored, the other side will find that the first side doesn't believe there is an open connection any more. Keepalives can make this sort of problem worse, because they increase the probability that PuTTY will attempt to send data during a break in connectivity. (Other types of periodic network activity can cause this behaviour; in particular, SSH-2 re-keys can have this effect. See section 4.19.2.)

 

 

在用navicat远程链接数据库以后,一段时间没有操做也会有断开链接这种状况,原理和putty的设置是同样的,在链接的高级设置里面有个keep alive 设置为10或者20就行。

 

 

“过一个平凡无趣的人生实在太容易了,你能够不读书,不冒险,不运动,不写做,不外出,不折腾……可是,人生最后悔的事情就是:我本能够。”——陈素封。
相关文章
相关标签/搜索