version 5 ssh problems

Clean netinstall on RB800 with v5.21
Added a public ssh key.

Client:
[leon@xxxx ~]# ssh -v
OpenSSH_5.4p1 FreeBSD-20100308, OpenSSL 0.9.8q 2 Dec 2010

ssh -i key.private admin@ip works just fine

Below is the debug output of ssh admin@ip which fails.
Can someone please tell me what is wrong with the new SSH version in ROS that it doesn’t work.
What is wrong with openssh that only mikrotik know about.
I have read the forums and done /ip ssh regenerate-host-key && reboot.
Results remain, key auth succeeds, keyboard fails.
We use SSH extensively and answers like rather use the API as in previous forums are nonsense. If ssh doesn’t work then remove it from the services.

Debug output:
[leon@cluster1 ~]# ssh -vvv admin@172.16.253.22
OpenSSH_5.4p1 FreeBSD-20100308, OpenSSL 0.9.8q 2 Dec 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.16.253.22 [172.16.253.22] port 22.
debug1: Connection established.
debug1: identity file /home/leon/.ssh/id_rsa type -1
debug1: identity file /home/leon/.ssh/id_rsa-cert type -1
debug1: identity file /home/leon/.ssh/id_dsa type -1
debug1: identity file /home/leon/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version ROSSSH
debug1: no match: ROSSSH
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.4p1 FreeBSD-20100308
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-dss
debug2: kex_parse_kexinit: aes192-cbc,aes128-cbc,aes256-cbc,blowfish-cbc,3des-cbc
debug2: kex_parse_kexinit: aes192-cbc,aes128-cbc,aes256-cbc,blowfish-cbc,3des-cbc
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 126/256
debug2: bits set: 512/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: host 172.16.253.22 filename /home/leon/.ssh/known_hosts
debug3: check_host_in_hostfile: host 172.16.253.22 filename /home/leon/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 9
debug1: Host ‘172.16.253.22’ is known and matches the DSA host key.
debug1: Found key in /home/leon/.ssh/known_hosts:9
debug2: bits set: 518/1024
debug1: ssh_dss_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/leon/.ssh/id_rsa (0x0)
debug2: key: /home/leon/.ssh/id_dsa (0x0)
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/leon/.ssh/id_rsa
debug3: no such identity: /home/leon/.ssh/id_rsa
debug1: Trying private key: /home/leon/.ssh/id_dsa
debug3: no such identity: /home/leon/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
admin@172.16.253.22’s password:
debug3: packet_send2: adding 64 (len 58 padlen 6 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup password
debug3: remaining preferred: ,keyboard-interactive,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
Permission denied, please try again.
admin@172.16.253.22’s password:

Just to confirm all works fine if we use version 4 so the problem still exists in version 5!

Can anyone from Mikrotik please comment on this?

RouterOS accepts DSA keys only, please generate one and place in default location (/home/user/.ssh/)

debug3: no such identity: /home/leon/.ssh/id_dsa

also, as i can see from logs, you do not have any key files in default location:

debug2: key: /home/leon/.ssh/id_rsa (0x0)
debug2: key: /home/leon/.ssh/id_dsa (0x0)

as you can see in scopes are file descriptor is null (0x0)

EDIT: on the other note, if you where not aware, by default, when you add key in RouterOS v5.x password login is disabled by default (you can read that in wiki manual)

also, you can change that by setting always-allow-password-login=yes:

 [admin@MikroTik] > /ip ssh print 
           forwarding-enabled: no
  always-allow-password-login: no

manual updated regardin this feature that was added in ROS 5.20