Linux 验证密码的速度很慢

Linux 验证密码的速度很慢

我最近开始使用 PuTTY 公钥和私钥对通过 ssh 登录我的本地虚拟机。

最初,它的工作速度相当快。从询问用户名到启动 shell/命令,只用了不到 1 秒就完成了。

但是,我在 VirtualBox 中安装了另一个虚拟机,这就是我的第一次虚拟机登录变慢的地方。以下是我的第一个虚拟机的事件日志。

2021-03-13 10:05:36 Pageant has 1 SSH-2 keys
2021-03-13 10:05:36 Pageant key #0 matches configured key file
2021-03-13 10:05:37 Trying Pageant key #0
2021-03-13 10:05:39 Sending Pageant's response
2021-03-13 10:05:39 Access granted
2021-03-13 10:05:39 Opening session as main channel
2021-03-13 10:05:41 Opened main channel
2021-03-13 10:05:41 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2021-03-13 10:05:41 Started a shell/command

如上所示,尝试 Pageant key 并打开会话作为主频道需要 2 秒。

我以前没有这个问题,这意味着上面的所有事件过去都需要 0 秒才能完成。但我最近遇到了缓慢的情况,不知道如何解决。

另外,当我su到另一个用户时,输入密码后,我需要等待 2 到 3 秒让 linux 进行验证。

当我 ssh 到另一个远程服务器时,我没有遇到这个问题。所以我认为问题出在我的虚拟机上。

相关内容