SSH连接非常缓慢和延迟

我最近使用ubuntu-core工具创build并configuration了一个ubuntu服务器14.04.3。 与IPv4和IPv6networking适合不同的客户。 但是前几天,我注意到ssh连接速度很慢。 所以input到terminal和服务器的响应需要很长时间。 使用哪个系统(Ubuntu,Windows(PUTTY)),互联网提供商或协议并不重要。 除此之外,iptables完全没有configuration(没有规则,一切都是ACCEPT)。

IPTABLESv4

Chain INPUT (policy ACCEPT 86219 packets, 8886K bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 76186 packets, 7537K bytes) pkts bytes target prot opt in out source destination 

IPTABLESv6

 Chain INPUT (policy ACCEPT 11 packets, 960 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 11 packets, 936 bytes) pkts bytes target prot opt in out source destination 

SSHconfiguration

 # SSHD PidFile /run/sshd/sshd.pid Port 22 ListenAddress [my ipv6] ListenAddress [my ipv4] Protocol 2 HostKey /etc/ssh/ssh_host_key_rsa UsePrivilegeSeparation yes SyslogFacility AUTH LogLevel INFO LoginGraceTime 60 PermitRootLogin no StrictModes yes PubkeyAuthentication yes AuthorizedKeysFile %h/.ssh/authorized_keys IgnoreRhosts yes HostbasedAuthentication no PermitEmptyPasswords no ChallengeResponseAuthentication yes AuthenticationMethods publickey,keyboard-interactive:pam PasswordAuthentication no X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog no TCPKeepAlive yes MaxAuthTries 3 #MaxStartups 10:30:60 Banner /etc/ssh/banner AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes 

我正在使用Google Authenticator,所以我需要键盘互动和ChallengeResponse。 为此,我必须将这些行添加到/etc/pam.d/sshd

 # 2WayAuth auth required pam_google_authenticator.so 

也许任何人都可以解决这个问题,因为这真的很烦人,我认为这似乎是一个严重的问题。