pCloud Partner Program

'UseDNS'相關日誌共 1 篇

  1. 2008/07/30 ssh登入緩慢問題

ssh登入緩慢問題

系統技術/FreeBSD/Linux 2008/07/30 01:57
views: 89328 times
最近的一次更新, 讓 FreeBSD 主機在登入時, 速度變得很慢, 這對操作上有蠻大的影響, 於是問了同事, 也著手進行查詢相關的可能, 原來是 OpenSSH 的名稱反查問題, 簡單處理方式如下:

修改 /etc/ssh/sshd_config 檔內的一個 UseDNS 參數, 設為 no 即可.

官方說明連結: http://www.openssh.org/faq.html#3.3

3.3 - ssh(1) takes a long time to connect or log in

Large delays (more that 10 seconds) are typically caused a problem with name resolution:

  • Some versions of glibc (notably glibc 2.1 shipped with Red Hat 6.1) can take a long time to resolve "IPv6 or IPv4" addresses from domain names. This can be worked around with by specifying AddressFamily inet option in ssh_config.
  • There may be a DNS lookup problem, either at the client or server. You can use the nslookup command to check this on both client and server by looking up the other end's name and IP address. In addition, on the server look up the name returned by the client's IP-name lookup. You can disable most of the server-side lookups by setting UseDNS no in sshd_config.
    下面還有如何判定是 "slow"
    CPUTime (SSHv1)[1] Time (SSHv2)
    170MHz SPARC/sun4m0.74 sec1.25 sec
    236MHz HPPA/8200[2]0.44 sec 0.79 sec
    375MHz PowerPC/604e0.38 sec0.51 sec
    933MHz VIA Ezra0.34 sec0.44 sec
    2.1GHz Athlon XP 2600+0.14 sec0.22 sec

    參考看看吧!



    top




    AGI 亞奇雷 240GB 2.5吋 SATA3 SSD 固態硬碟
    TEAM十銓 L5 Lite 3D 1TB 2.5吋 SSD固態硬碟
    統一 番茄汁(6入/組)


     Waiting...