【发布时间】:2023-04-03 07:40:01
【问题描述】:
我试图编辑 sshd_config 文件,在这期间我的机器崩溃了。当我再次尝试时,它开始显示以下消息-
Found a swap file by the name "/etc/ssh/.sshd_config.swp"
dated: Mon Oct 23 07:17:17 2017 [cannot be read]
While opening file "/etc/ssh/sshd_config"
dated: Mon Oct 23 22:19:04 2017
NEWER than swap file!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /etc/ssh/sshd_config"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/ssh/.sshd_config.swp"
to avoid this message.*
我删除了 .swp 文件,但看起来原始文件已被删除。之后我运行了这个命令“sudo service sshd restart”。
现在我无法使用 linux 终端连接到 AWS 服务器。谁能帮我解决这个问题
【问题讨论】:
标签: linux amazon-web-services ssh openssh amazon-lightsail