Cd:/etc/ssh/sshd_config:修复ssh超时问题时不是目录错误

4smxwvx5  于 2022-09-21  发布在  Unix
关注(0)|答案(1)|浏览(175)

我已经在数字海洋上创建了一个水滴,并安装了CentOS作为其操作系统。我想解决远程ssh连接频繁超时的问题。我在这个链接上找到了一个指南,我如何修复ssh超时?我已经成功导航到**/etc/ssh/目录。当我列出/etc/ssh/目录中的可用子目录时,可以看到sshd_config子目录**。但是,当我尝试移到子目录中时,收到错误消息“bash:cd:/etc/ssh/sshd_config:Not a directory”。我能做错什么呢?

下面是我在终端上输入的内容

[root@centosFirstServer134327 ssh]# pwd
/etc/ssh

[root@centosFirstServer134327 ssh]# ls
moduli        ssh_host_ecdsa_key      ssh_host_ed25519_key.pub  sshd_config
ssh_config    ssh_host_ecdsa_key.pub  ssh_host_rsa_key
ssh_config.d  ssh_host_ed25519_key    ssh_host_rsa_key.pub

[root@centosFirstServer134327 ssh]# cd /etc/ssh

[root@centosFirstServer134327 ssh]# cd /etc/ssh/sshd_config
bash: cd: /etc/ssh/sshd_config: Not a directory
k10s72fa

k10s72fa1#

sshd_config是一个文件。这就是为什么你不能cd到它。

相关问题