Forum

Yampiz Forum

Sharing let knowledge Spreaded, Reading let spirits growth, Creative let culture extended, Let us
  • 禁止廣告文
  • 知識傳播
  • 閱讀
  • 心靈成長
  • 創作
  • 文化傳承
Forum Dictionary / PC / Linux 討論版 /

在內部網路使用 ssh 連接時速度很慢?

New Subject
Random
Previous
Next
|
在內部網路使用 ssh 連接時速度很慢?

我自己在內部網路使用 ssh 相互連接的時侯,一般主機的反應都很快,只有一兩次架設的新主機會很慢,所以也就不以為意了。

今天又在玩弄新主機的時侯,又發生同樣 ssh 連接很慢的問題,所以我決心把問題找出來,在 google 找很多文章,大多是指向 DNS 反查的問題,一般文章的解決方式也都大同小異,就是關閉 ssh 的反查機制!

關閉方法一:修改 /etc/ssh/sshd_config ,把 #UseDNS yes 前的#去掉,改成 UseDNS no 就可以了。

關閉方法二:修改 /etc/nsswitch.conf ,把 #hosts: files dns這一行換成 hosts: files dns[NOTFOUND=return]。

最後再重新啟動 ssh 服務,但是經測試的結果是...還是很慢,後來實驗出最快的方法:

只要把你要連接的主機定義在 /etc/hosts 檔裡面就可以了。

127.0.0.1 localhost localhost
192.168.1.100 pc50   <-------把要連接的主機定義出來。

修改完 ssh 的連接速度就變快囉。

  • Keywords : 修改, hosts, 就可以, 問題, localhost, files, UseDNS, 關閉方法二, 關閉方法一, 關閉, 連接, 解決方式, 要連接, 經測試, 相互連接, 發生同樣, 玩弄新主機, 架設, 服務, 方法
0 0
2007-11-09T17:23:12+0000

q6986 :

!!! The contents has been hidden because it violates policy tactic. !!!
0 0
2019-07-18T13:19:18+0000


  • Now, you can post comments by Facebook Account when your Yampiz account was logout or unvariable. whatever, we suggest to post comment by Yampiz Account to get more bounds to join new events of Heyxu
Comment
 
Verify
  • Auto Platform
    For better browsing experience, it will auto detects your device to display webpage.
  • Bug Report
    Tell us about the idea, problem and errors you found.
  • Comodo Secure
    The sensitive data transmission adopts by SSL-2048 authenticated encryption.
  • Copyright
    © 2009 YamPiz Digital Inc. & Jaby Group. All rights reserved.
  • Revised Version
    V2.2.061
    03 Aug 2023 (GMT+8)