以下是Ubuntu SSH性能优化方法:
UseDNS no。GSSAPIAuthentication no。TCPKeepAlive yes,并设置ClientAliveInterval和ClientAliveCountMax。curve25519-sha256@libssh.org等高效算法。/etc/sysctl.conf文件设置相关参数,如net.ipv4.tcp_window_scaling=1等,然后执行sudo sysctl -p生效。Compression yes,或在连接时使用-C参数。~/.ssh/authorized_keys文件,同时在配置文件中禁用密码认证PasswordAuthentication no。MaxStartups限制并发连接数,用AllowUsers/AllowGroups限制登录用户。