ssh - SSH 连接被端口 22 关闭
问题描述
我正在尝试与我的 CPanel 服务器建立 SSH 连接。我正在使用我的 mac 来执行此操作。但是,在生成密钥并将公钥保存/授权到服务器后,我无法创建 SSH 连接。
我保证我已经查看了所有其他相关的解决方案,例如更改权限、检查密钥是否在服务器上得到授权等。
结果如下:
.ssh % ssh -vvv cpanelusername@site.com
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to site.com port 22.
debug1: Connection established.
debug1: identity file /Users/user/.ssh/id_rsa type 0
debug1: identity file /Users/user/.ssh/id_rsa-cert type -1
debug1: identity file /Users/user/.ssh/id_dsa type -1
debug1: identity file /Users/user/.ssh/id_dsa-cert type -1
debug1: identity file /Users/user/.ssh/id_ecdsa type -1
debug1: identity file /Users/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/user/.ssh/id_ed25519 type -1
debug1: identity file /Users/user/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/user/.ssh/id_xmss type -1
debug1: identity file /Users/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000002
debug3: fd 5 is O_NONBLOCK
debug1: Authenticating to site.com:22 as 'cpanelusername'
debug3: hostkeys_foreach: reading file "/Users/user/.ssh/known_hosts"
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 107.180.56.153 port 22
经过大量研究后,我仍然对这些调试的含义以及我的连接被关闭的原因感到困惑。如果有人对我为什么无法连接或可以解释调试有任何见解,那将不胜感激。提前致谢!
解决方案
推荐阅读
- debugging - 是否可以同时使用 gdb 和嵌套的 qemu 虚拟机来调试 linux 用户空间程序和主机管理程序?
- c# - 复制或移动替换文件和更新版本共享点 CSOM
- html - cgraph库生成带有html标签属性的点文件?
- elasticsearch - 如何防止新索引的分片仅在 Elasticsearch 中的几个节点上分配?
- javascript - 如何在javascript手风琴中禁用自动滚动
- azure-logic-apps - 具有 Outlook 连接器的逻辑应用程序中的自定义标头
- composer-php - 找不到命令:作曲家
- javascript - PerformanceNavigation 的替代 Javascript 方法(跨浏览器兼容)
- sql - oracle数据库中的join表
- ios - 如何从资产中获取不同的图像并将其分配给不同表格视图单元格中的图像视图