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就行。

 

 

「過一個平凡無趣的人生實在太容易了,你能夠不讀書,不冒險,不運動,不寫做,不外出,不折騰……可是,人生最後悔的事情就是:我本能夠。」——陳素封。
相關文章
相關標籤/搜索