【ssh连接】奇奇怪怪报错记录

gitlab配置ssh连接,先跟着教程生成密钥,上传公钥,将服务器信息存入config文件,但是ssh连接超时,很急,想用服务器,各种搜索尝试,搞了两三天别的什么都没干,还是没解决,绝望

3.26更:用跳板机的方式登录上了,解决

问题1. ssh: connect to host xx.xx.xx.x port xxxx: Connection timed out

已知服务器端没有问题,别人可以登上

尝试ping远程服务器,不通,报错

尝试ping百度,可以,不是网络的问题

尝试ssh -T git@github.com


The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? 
Host key verification failed.

尝试:在vscode的remote ssh里设置:

没用

尝试:关闭防火墙

没用

问题2:Host key verification failed.

尝试加“-v”看看问题出在哪里 ssh -vT git@github.com

ssh -vT git@github.com
>> 
OpenSSH_9.4p1, OpenSSL 3.1.2 1 Aug 2023
debug1: Reading configuration data /c/Users/15958/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [20.205.243.166] port 22.
debug1: Connection established.
debug1: identity file /c/Users/15958/.ssh/id_rsa type 0
debug1: identity file /c/Users/15958/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/15958/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/15958/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/15958/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/15958/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/15958/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/15958/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/15958/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/15958/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/15958/.ssh/id_xmss type -1
debug1: identity file /c/Users/15958/.ssh/id_xmss-cert type -1
debug1: identity file /c/Users/15958/.ssh/id_dsa type -1
debug1: identity file /c/Users/15958/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.4
debug1: Remote protocol version 2.0, remote software version babeld-05989c77
debug1: compat_banner: no match: babeld-05989c77
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /c/Users/15958/.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: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
debug1: load_hostkeys: fopen /c/Users/15958/.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: hostkeys_find_by_key_hostfile: hostkeys file /c/Users/15958/.ssh/known_hosts2 does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Host key verification failed.

解决:在这一句输入yes就可以了,我之前直接点回车了,默认回答应该是no(好弱智的问题)

问题3. ping不通服务器,请求超时

相关推荐

  1. vscode remote ssh 连接 ubuntu/linux解决方法

    2024-03-26 16:56:04       21 阅读
  2. pip安装SSL

    2024-03-26 16:56:04       45 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-26 16:56:04       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-26 16:56:04       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-26 16:56:04       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-26 16:56:04       20 阅读

热门阅读

  1. 算法 字符串匹配 索引查找表(完整源码)

    2024-03-26 16:56:04       17 阅读
  2. 35岁程序员职业生涯的终点吗?

    2024-03-26 16:56:04       13 阅读
  3. Qt day4

    Qt day4

    2024-03-26 16:56:04      16 阅读
  4. GO 语言基础学习记录(二)

    2024-03-26 16:56:04       23 阅读
  5. arthas查看方法返回值

    2024-03-26 16:56:04       18 阅读
  6. Leetcode 41. 缺失的第一个正数

    2024-03-26 16:56:04       18 阅读
  7. centos7的docker安装的mongo,怎么设置账号密码

    2024-03-26 16:56:04       17 阅读