SSH Problem: ssh_exchange_identification

Hello,

I have a few Mikrotiks that for some reason I am not able to SSH into. I can access them via telnet, winbox, ect..but when I try to ssh in, I get the following:

ssh_exchange_identification: Connection closed by remote host

For linux systems, I know this can be an issue if you have setup a hosts.allow or hosts.deny file, but I have no clue what could cause this for the Mikrotiks. I have tried stoping and starting the service with no help. I have lots of other Mikrotiks that are working with ssh with no problem.

Has anyone run into this before?

Thanks

Updates,

I have noticed that by stopping and starting the ssh service the problem temporarily goes away. The 3 devices that i have noticed this problem on so far are running 2.9.39

Same Problem

ssh_exchange_identification: Connection closed by remote host

rb 433ah Routeros 3.20…

so and between “it works” and “it gives this error” NOTHING changed? no configuration at all? where are you connecting from (client type)?

RB433AH i update to version 3.18… for pcq problem… back to 3.13… when read 3.20 solve this problem install 3.20 and update firmware.. and fail ssh

at times the service responds, but I can not determine what makes it work or stop working

cpu using is at 50% (not saturation)
disable, enable, change port etc ssh service, no efect

client is always same.. putty from windows or ssh command line from linux box (both fail now)

winbox work perfect.. and change ssh port with winbox port and winbox work ok.

need configuration file?

i think reset all and configure complety solve the problem.. but have a complex configuration

Had same problem, with 4 devices, upgraded them to 3.22. In abour a hour i dont see any problems, i’ll write about this in few days.

problem exists, with RB411. After few days uptime, i see

ssh_exchange_identification: Connection closed by remote host

when i try to ssh to it.

Problem is strange.
From windows:

PuTTY Fatal Error

Server unexpectedly closed network connection

OK

From linux:

$ ssh -vv link_mar31
OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to link_mar31 [172.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
$

from routeros 3.20:17
[admin@dude] > /system ssh 172.xxx.xxx.xxx user=admin port=22 ;
ssh_exchange_identification: Connection closed by remote host

Welcome back!
[admin@Hey dude] >

All devices are probed by dude every minute or so. When i reboot device, ssh works, and these errors begins after 1-2 days.
I disabled ssh on one of devices.

this is my dude ssh probe:
ssh probe.png

It looks like dude’s fault, because, when i stoped probing, i can ssh normaly to device. O my custom probe problem. Maybe something with ssh server, because there is no ssh connections in /ip firewall connections.

I had the same problem. I fixed it when i turn on this packages: calea , isdn, radiolan, user-manager.
I have question to Normis, what package fixed this problem?


Sorry for my eng…lish :slight_smile:

Hi

I am having the same problem on an RB411, running 3.10

I know the first response would normally be to upgrade software, but it seems that conjurer was having the same problems with 3.22

Does anyone know yet what is causing this?

I don’t have problems anymore, turned offf ssh cheking on all routerbaords. I only probe linux servers for ssh and other more important stuff.
O don’t think it problem with packages, after reboot it works ok, about 20-30 hours.

I have had the same problem.

After upgrading to version 3.24 the problem dissapeared.

Hello,
we have the same problem on 2.9.51, 3.10, 3.15, 3.20, 3.22, 3.24 and of course 3.25.

Nothing help, only reboot the router.

Note: https not working too!

Well after all without ssh probes dude runs is faster.
And i rarely use ssh. I use rarely winbox ox mac telnet. And in future i am not going to let dude monitor ssh on any of routeboards, because, when i realy need connect to it, i may get that error.
Do anyone has this problem with 4.0beta?

On the ssh service, check the available from field.

Hi!

We have the same problem, after about an hour no more response on ssh.
Nothing changed under this time.

ROS 4.6 4.7… fail
ROS 5.0b1 … working

I get the same problem.
Some hours after the reboot ssh stop working.
Running v4.9…
No ssh dude polling active.

Of the 39 routers I have set SSH and FTP up on; when I try to connect via SFTP I am getting this same error (ssh_exchange_identification: Connection closed by remote host) on 7 of them. The other 32 work just fine. Below I have listed the kind of router with software version that it is happening to.

x86 (PC router) v3.13
x86 (PC router) v3.13
x86 (PC rotuer) v3.30
? v2.9.51 - did not have a hand in setting this up originally
RB1000 v3.14
RB1000 v3.30
RB1000 v4.11

The working ones are all 333, 433, 433AH, 450, 450G, 493, 493AH, and 750G running os 2.9.50 to 4.13. I have checked the packages between working and non-working routers and there is nothing obvious that would lead me to believe there is a package problem, and from looking at my list this is happening on only my PC based routers and my RB1000s. Any insight as to what could be causing this would be nice and very appreciated.

-Joe

I have a little more information that may help:

When I said this was a problem on all x86 and RB1000s I was wrong there. I have one RB1000 that is working. I checked to see what packages it is running and compared it to the ones that are not working. (See attached image)

The RB1000 that is working is shaded in green and I have marked what packages that are installed and active with an ‘x’ and the packages that are installed and disabled are marked with a ‘d’. Blank spaces mean that package is not installed at all.

The top of each row indicated the type of router and the OS version it is running.

Using FileZilla in Windows 7 I can manually connect to routers 1 and 5 with SFTP using a username and password for the account that the public SSH is key is setup for. (I have not tried using the public key in FileZilla) The error I get in FileZilla on the others is:

Error: Server unexpectedly closed network connection
Error: Could not connect to server

Checking the router log and the terminal screen in the routers does not give any additional information.

I really need some ideas on how I can get though this.

  • Joe
    packages.png