OpenSSH_9.2p1 Debian-2, OpenSSL 3.0.9 30 May 2023 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to lxslc702.ihep.ac.cn [2401:de00:2:332::186] port 22. debug1: Connection established. debug1: identity file /home/fyf/.ssh/id_rsa type -1 debug1: identity file /home/fyf/.ssh/id_rsa-cert type -1 debug1: identity file /home/fyf/.ssh/id_ecdsa type -1 debug1: identity file /home/fyf/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/fyf/.ssh/id_ecdsa_sk type -1 debug1: identity file /home/fyf/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /home/fyf/.ssh/id_ed25519 type -1 debug1: identity file /home/fyf/.ssh/id_ed25519-cert type -1 debug1: identity file /home/fyf/.ssh/id_ed25519_sk type -1 debug1: identity file /home/fyf/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /home/fyf/.ssh/id_xmss type -1 debug1: identity file /home/fyf/.ssh/id_xmss-cert type -1 debug1: identity file /home/fyf/.ssh/id_dsa type -1 debug1: identity file /home/fyf/.ssh/id_dsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4 debug1: compat_banner: match: OpenSSH_7.4 pat OpenSSH_7.4* compat 0x04000006 debug1: Authenticating to lxslc702.ihep.ac.cn:22 as 'fanyufan' debug1: load_hostkeys: fopen /home/fyf/.ssh/known_hosts: No such file or directory debug1: load_hostkeys: fopen /home/fyf/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY Connection closed by 2401:de00:2:332::186 port 22
时间: 2023-09-07 11:13:51 浏览: 119
根据您提供的信息,看起来您尝试使用SSH连接到主机lxslc702.ihep.ac.cn的端口22,但连接被远程服务器关闭了。关闭连接的原因可能有很多,例如网络问题、身份验证失败或服务器配置问题。要进一步诊断此问题,您可以尝试以下步骤:
1. 确保网络连接正常:检查您的网络连接是否正常,确保您可以访问远程服务器。
2. 检查身份验证凭证:确保您使用的身份验证凭证(例如用户名和密码、SSH密钥)是正确的,并且具有连接到远程服务器的权限。
3. 检查远程服务器配置:如果您有权限访问远程服务器的配置文件,请检查是否存在任何配置问题,例如防火墙设置、访问限制或SSH服务配置。
如果您仍然遇到问题,建议联系远程服务器的管理员或技术支持人员以获取更多帮助和支持。
相关问题
debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug1: configuration requests final Match pass debug1: re-parsing configuration debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to 10.251.150.35 [10.251.150.35] port 5432. debug1: connect to address 10.251.150.35 port 5432: Connection refused ssh: connect to host 10.251.150.35 port 5432: Connection refused 算端口通了吗
根据您提供的调试信息,可以看到在尝试连接到IP地址为10.251.150.35,端口号为5432的主机时,出现了"Connection refused"(连接被拒绝)的错误。
这意味着目标主机在指定的端口上没有正在运行的服务,或者被防火墙或网络配置所限制。根据这个错误,我们无法判断端口是否通畅,因为连接被拒绝并不一定意味着端口不通。
要确定端口是否通畅,您可以尝试以下方法:
1. 检查目标主机上的服务是否正在监听指定的端口号(5432)。您可以使用命令`netstat -tln`或`ss -tln`来检查目标主机上正在运行的服务及其监听端口。
2. 检查目标主机上的防火墙设置。确保防火墙规则允许从您的位置连接到目标主机的5432端口。
3. 还可以尝试使用telnet命令来测试端口是否通畅。例如,使用命令`telnet 10.251.150.35 5432`来尝试连接到目标主机的5432端口。如果连接成功,则表示端口通畅;如果连接失败或超时,则表示端口不通畅。
请根据以上建议进行检查,并确保您正在连接到正确的IP地址和端口号上运行的服务。如有需要,请提供更多关于您的网络环境和配置的信息,以便我能够给出更具体的建议。
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips Unsupported Match attribute final /etc/ssh/ssh_config.d/05-redhat.conf line 3: Bad Match condition
根据您提供的信息,您正在使用 OpenSSH 7.4p1 版本,并且遇到了 "Unsupported Match attribute final" 的错误消息。这通常是由于旧的Match条件不再被支持而导致的。
在OpenSSH 7.4p1版本中,`Match final` 条件已被弃用,因此您需要将 `/etc/ssh/ssh_config.d/05-redhat.conf` 文件中的 `Match final` 条件更新为其他条件。例如,您可以使用 `Match exec` 条件来代替 `Match final` 条件。您可以将配置文件更新为以下内容来解决这个问题:
```
# Original configuration with "Match final" condition
Match final sshd_config_local
# Updated configuration with "Match exec" condition
Match exec "/usr/bin/test -f /etc/ssh/sshd_config_local && /usr/bin/test `stat -c %U /etc/ssh/sshd_config_local` = root"
```
请注意,这只是一个示例,您需要根据您的实际情况进行修改。如果您需要更多帮助,请告诉我。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![tgz](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)