Ubuntu 16.04 ssh 延迟问题

Ubuntu 16.04 ssh 延迟问题

现在这个错误真的很令人沮丧,我找不到原因。

我在 digitalocean 上有一个服务器,用于为我的网站提供服务。但自从从 Windows 切换到 Ubuntu 16.04 后,出现了随机 ssh 延迟问题。它时断时续。

延迟不仅仅发生在登录时。(我尝试添加 UseDNS 否)。即使我最终登录了,我也无法输入任何命令,因为命令需要 10 到 20 秒才能显示出来。

我做了跟踪路由,但不知道这意味着什么以及如何解决这个问题。

traceroute "ip"
traceroute to "ip" ("ip"), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  172.23.80.49 (172.23.80.49)  80.367 ms  127.421 ms  127.479 ms
 4  mai-b1-link.telia.net (213.248.83.161)  293.276 ms mai-b1-link.telia.net (213.248.76.89)  293.319 ms mai-b1-link.telia.net (213.248.83.161)  293.389 ms
 5  ash-bb4-link.telia.net (62.115.113.200)  293.391 ms * *
 6  nyk-bb2-link.telia.net (62.115.137.65)  293.514 ms nyk-bb1-link.telia.net (213.155.134.126)  213.196 ms nyk-bb2-link.telia.net (62.115.137.65)  166.349 ms
 7  nyk-b3-link.telia.net (62.115.112.253)  180.545 ms nyk-b3-link.telia.net (80.239.147.138)  204.523 ms nyk-b3-link.telia.net (80.91.247.19)  204.509 ms
 8  digitalocean-ic-306498-nyk-b3.c.telia.net (62.115.45.10)  204.608 ms  204.596 ms *
 9  162.243.188.234 (162.243.188.234)  205.152 ms 162.243.188.230 (162.243.188.230)  205.032 ms  190.648 ms
10  "ip" ("ip")  59.939 ms  105.458 ms  116.519 ms
$ traceroute -n "ip"
traceroute to "ip" ("ip"), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  172.23.80.49  88.487 ms  131.767 ms  131.804 ms
 4  213.248.76.89  217.216 ms 213.248.83.161  217.284 ms 213.248.76.89  217.320 ms
 5  62.115.113.200  267.056 ms 62.115.113.198  267.865 ms  267.904 ms
 6  213.155.134.148  267.909 ms 213.155.133.8  295.299 ms 62.115.134.110  185.072 ms
 7  80.239.147.132  184.852 ms 80.239.147.134  165.540 ms 62.115.112.251  166.324 ms
 8  62.115.45.6  166.163 ms  148.741 ms  148.065 ms
 9  162.243.188.230  147.985 ms  213.959 ms 162.243.188.234  165.199 ms
10  "ip"  165.055 ms  150.840 ms  158.119 ms

另外,我的朋友运行 arch 时也遇到了一点延迟,但是仍然可以使用。

“-vvv”标志输出:

debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to "ip" (["ip"]:305).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 91
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending environment.
debug3: Ignored env XDG_VTNR
debug1: Sending env LC_PAPER = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug1: Sending env LC_ADDRESS = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env XDG_SESSION_ID
debug3: Ignored env XDG_GREETER_DATA_DIR
debug1: Sending env LC_MONETARY = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env CLUTTER_IM_MODULE
debug3: Ignored env SESSION
debug3: Ignored env GPG_AGENT_INFO
debug3: Ignored env TERM
debug3: Ignored env VTE_VERSION
debug3: Ignored env SHELL
debug3: Ignored env QT_LINUX_ACCESSIBILITY_ALWAYS_ON
debug3: Ignored env WINDOWID
debug1: Sending env LC_NUMERIC = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env UPSTART_SESSION
debug3: Ignored env GNOME_KEYRING_CONTROL
debug3: Ignored env GTK_MODULES
debug3: Ignored env USER
debug3: Ignored env LS_COLORS
debug1: Sending env LC_TELEPHONE = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env QT_ACCESSIBILITY
debug3: Ignored env XDG_SESSION_PATH
debug3: Ignored env XDG_SEAT_PATH
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env DEFAULTS_PATH
debug3: Ignored env XDG_CONFIG_DIRS
debug3: Ignored env DESKTOP_SESSION
debug3: Ignored env PATH
debug3: Ignored env QT_IM_MODULE
debug3: Ignored env QT_QPA_PLATFORMTHEME
debug1: Sending env LC_IDENTIFICATION = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env XDG_SESSION_TYPE
debug3: Ignored env PWD
debug3: Ignored env JOB
debug3: Ignored env XMODIFIERS
debug3: Ignored env GNOME_KEYRING_PID
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env GDM_LANG
debug3: Ignored env MANDATORY_PATH
debug3: Ignored env NODE_PATH
debug1: Sending env LC_MEASUREMENT = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env COMPIZ_CONFIG_PROFILE
debug3: Ignored env IM_CONFIG_PHASE
debug3: Ignored env PAPERSIZE
debug3: Ignored env GDMSESSION
debug3: Ignored env SESSIONTYPE
debug3: Ignored env GTK2_MODULES
debug3: Ignored env SHLVL
debug3: Ignored env HOME
debug3: Ignored env XDG_SEAT
debug3: Ignored env LANGUAGE
debug3: Ignored env GNOME_DESKTOP_SESSION_ID
debug3: Ignored env UPSTART_INSTANCE
debug3: Ignored env UPSTART_EVENTS
debug3: Ignored env XDG_SESSION_DESKTOP
debug3: Ignored env LOGNAME
debug3: Ignored env COMPIZ_BIN_PATH
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env XDG_DATA_DIRS
debug3: Ignored env QT4_IM_MODULE
debug3: Ignored env LESSOPEN
debug3: Ignored env INSTANCE
debug3: Ignored env UPSTART_JOB
debug3: Ignored env XDG_RUNTIME_DIR
debug3: Ignored env DISPLAY
debug3: Ignored env XDG_CURRENT_DESKTOP
debug3: Ignored env GTK_IM_MODULE
debug3: Ignored env LESSCLOSE
debug1: Sending env LC_TIME = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug1: Sending env LC_NAME = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env XAUTHORITY
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768

在输出的最后一行处冻结。

任何帮助将不胜感激。

答案1

除非“top”显示 CPU 使用率徘徊在 100% 左右,否则您的延迟是由于某种形式的网络问题造成的。

如果您对他们提供的服务水平有疑问,请联系 DigitalOcean。

相关内容