[TOC]

如何处理报错“kex_exchange_identification: Connection closed by remote hostConnection closed by ::1 port 22”

image-20230114220851778

这是一张令人质壁分离的报错截图,在hexo d后出现这样一堆的报错

原因是:ssh秘钥的过期,需要更新ssh的key

  • 首先可以将本地/Users/username/.ssh/中的文件删除

  • 然后再终端输入ssh-keygen -t rsa -C “你的邮箱.com”

  • 一路回车

  • 输入ssh -T [email protected]测试连接

  • yes/no回答yes

  • $ ssh -T [email protected]
    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])? yes
    Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
    Hi dx2331lxz! You've successfully authenticated, but GitHub does not provide shell access.
    
  • 看到Hi dx2331lxz! You've successfully authenticated, but GitHub does not provide shell access.就可以了