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.
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
$ 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.
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?
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.
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?
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.
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.