解决ssh中的”Connection closed by 10.0.0.21“问题
来源:互联网 发布:投诉了淘宝卖家会怎样 编辑:程序博客网 时间:2024/05/24 07:02
远程的电脑是个新安装的ubuntu,在本地执行ssh时,出现错误”Connection closed by 10.0.0.21“。
解决步骤:
首先保证远程PC的ssh 服务启动,使用命令ps -e | grep ssh查看,出现以下信息说明服务已经开启。
12570 ? 00:00:00 sshd
然后现在命令行中加入 -v,如下
ssh -v ubuntu@10.0.0.21
会出现一系列打印信息:
ubuntu@ubuntu-ThinkPad-X220:~$ ssh -v ubuntu@10.0.0.21OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 19: Applying options for *debug1: Connecting to 10.0.0.21 [10.0.0.21] port 22.debug1: Connection established.debug1: identity file /home/ubuntu/.ssh/id_rsa type 1debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1debug1: identity file /home/ubuntu/.ssh/id_dsa type -1debug1: identity file /home/ubuntu/.ssh/id_dsa-cert type -1debug1: identity file /home/ubuntu/.ssh/id_ecdsa type -1debug1: identity file /home/ubuntu/.ssh/id_ecdsa-cert type -1debug1: identity file /home/ubuntu/.ssh/id_ed25519 type -1debug1: identity file /home/ubuntu/.ssh/id_ed25519-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000debug1: SSH2_MSG_KEXINIT sentConnection closed by 10.0.0.21
发现是本地机器将SSH2_MSG_KEXINIT 发送过去后,远程机器断开连接。怀疑是对方的key还未生成,执行命令sudo dpkg-reconfigure openssh-server
出现打印信息如下:
[sudo] password for ubuntu: Creating SSH2 RSA key; this may take some time ...Creating SSH2 DSA key; this may take some time ...Creating SSH2 ECDSA key; this may take some time ...Creating SSH2 ED25519 key; this may take some time ...ssh stop/waitingssh start/running, process 12683
连接就ok了
参考链接:https://stackoverflow.com/questions/2419412/ssh-connection-stop-at-debug1-ssh2-msg-kexinit-sent
阅读全文
0 0
- 解决ssh中的”Connection closed by 10.0.0.21“问题
- 解决ssh连接提示Connection closed by xx
- ssh问题:ssh_exchange_identification: Connection closed by remote host
- ssh问题:ssh_exchange_identification: Connection closed by remote host...
- ssh问题:ssh_exchange_identification: Connection closed by remote host...
- ssh/scp:ssh_exchange_identification:Connection closed by remote host的问题
- ssh_exchange_identification: Connection closed by remote host 问题的解决
- ssh 提示Connection closed by * 的解决方案
- ssh无密码登录报错‘Connection closed by ::1’ 问题
- SSH连接服务器报ssh_exchange_identification: Connection closed by remote host
- Cygwin-Cygwin ssh Connection closed by ::1 出错
- ssh连接提示 "Connection closed by remote host"
- ssh连接提示 "Connection closed by remote host"
- ssh连接报Connection closed by foreign host.
- SSH无法连接:Connection closed by foreign host
- ssh连接提示 "Connection closed by remote host"
- SSH连接服务器报ssh_exchange_identification: Connection closed by remote host
- securecrt ssh connection closed
- 加拿大银行行长:比特币“让我彻夜难眠”
- Xcode代码字体变成白色,无法出现联想代码解决方案
- 金链盟基于BCOS平台,重磅推出金融升级版—FISCO BCOS
- Stanford机器学习---第三讲. 逻辑回归和过拟合问题的解决 logistic Regression & Regularization
- python3 zip函数
- 解决ssh中的”Connection closed by 10.0.0.21“问题
- 以太币、瑞波币、莱特币进入彭博终端
- linux下寻找jdk安装包
- HTML标签总汇--一览表
- Zabbix 监控 Windows下MySQL
- 美国财政部报告:DLT数据存储引起监管担忧
- CFTC提出加密货币“交付”定义
- 万云:区块链可帮助公证行业创新改革,为互联网公证打下基础
- 革旧图新?区块链需要新的监管方式