SSH:连接被远程服务器关闭 [英] SSH: Connection closed by remote server

查看:406
本文介绍了SSH:连接被远程服务器关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 ssh 登录到我的远程服务器.但是每当我尝试使用 ssh 命令通过终端登录时:

I am trying to ssh login to my remote server. But whenever i try to login through terminal using ssh command:

  ssh root@{ip_address}

出现错误:

 Connection closed by {ip_address}

我检查了主机拒绝和主机允许,文件中没有任何内容.我不明白为什么会这样?

I checked hosts deny and hosts allow, there is nothing in the file. I am not getting why it happening?

当我更换我的工作站并且密钥被更改时发生了这种情况.当我尝试 ssh 登录时,它要求添加密钥,我输入 yes 然后它关闭了连接.

It happened when i changed my workstation and key got changed. When i tried ssh login, it asked to add key and i entered yes and then it closed the connection.

有什么办法可以重新连接ssh吗?

Is there any way to get connected with ssh again?

感谢您的帮助.

谢谢.

ssh -v -v -v -v root@{ip_address} 的输出是

Output of ssh -v -v -v -v root@{ip_address} is

OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to {ip_address} [{ip_address}] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/mona/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/mona/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/mona/.ssh/id_rsa-cert type -1
debug1: identity file /home/mona/.ssh/id_dsa type -1
debug1: identity file /home/mona/.ssh/id_dsa-cert type -1
debug1: identity file /home/mona/.ssh/id_ecdsa type -1
debug1: identity file /home/mona/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "{ip_address}" from file "/home/mona/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 151.236.220.15

推荐答案

遇到了同样的问题,但简单的远程服务器重启有所帮助.

Had the same issue but a simple remote server reboot helped.

这篇关于SSH:连接被远程服务器关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆