日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > linux >内容正文

linux

linux怎么修改sftp默认端口,转:linux 修改sftp服务默认提供者sshd的session timeout

發(fā)布時(shí)間:2023/11/30 linux 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux怎么修改sftp默认端口,转:linux 修改sftp服务默认提供者sshd的session timeout 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

NAT firewalls like to time out idle sessions to keep their state tables clean and their memory footprint low.

NAT防火墻喜歡對(duì)空閑的會(huì)話進(jìn)行超時(shí)處理,以確保它們狀態(tài)表的干凈和內(nèi)存的低占用率。

Some firewalls are nice, and let you idle for up to a day or so; some are gestapo and terminate your session after 5 minutes.

一些防火墻比較友好,允許你的空閑會(huì)話時(shí)間為一天甚至超過一天;另一些卻如蓋世太保,5分鐘空閑就終止你的會(huì)話。

I finally got tired of my ssh sessions getting disconnected at places where I don't control the firewalls, and figured out how to stop it.

我最終疲于我的ssh連接會(huì)話被我不能控制的防火墻斷開,并找出了阻止它的方案。

Turn out ssh has a nice inband keepalive mechanism, and even lets you set it on a per-destination basis.

結(jié)論是ssh內(nèi)帶有一個(gè)很好的保持會(huì)話存活機(jī)制,甚至允許你在每一臺(tái)目標(biāo)機(jī)器上設(shè)置。

Just create a ~/.ssh/config file with something like the following (* will match any host, if you wanted you could restrict this to particular destinations like *kehlet.cx):

只要用以下類似的內(nèi)容創(chuàng)建一個(gè) ~/.ssh/config文件(*號(hào)將匹配所有的主機(jī),如果你想,你可以嚴(yán)格的設(shè)置它為特定的目標(biāo)主機(jī),像kehlet.cx):

----------------

Host *

ServerAliveInterval 240

----------------

That's how often, in seconds, ssh will send a keepalive request (at the application layer) to the other end if the connection's been otherwise idle. 4 minutes should be good :-).

這通常是以秒為單位,如果這個(gè)連接空閑,ssh將發(fā)送一個(gè)保持存活的請(qǐng)求(在應(yīng)用層)給另一端。4分鐘應(yīng)該不錯(cuò)。

The Host line lets you pattern match your destinations. Minimal effort, no impact to your system (say, as you would have if you mucked with your system's default TCP keepalive settings), and it works like a charm.

Host行使你匹配你的目標(biāo)主機(jī)。極小的努力,對(duì)你的系統(tǒng)毫無(wú)影響(即,如果你弄亂你的系統(tǒng)默認(rèn)TCP保持存活時(shí)間設(shè)置的話,將影響你的系統(tǒng)),并且很有效。

總結(jié)

以上是生活随笔為你收集整理的linux怎么修改sftp默认端口,转:linux 修改sftp服务默认提供者sshd的session timeout的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。