I have a MikroTik RouterOS 7.20.6 (CCR1016-12S-1S+) where SSH access suddenly stopped working. I am using Winbox (MAC‑telnet) to access the router, but I need SSH for automation (e.g., Ansible, scripts).
Symptoms:
· SSH from any client (Windows, Linux, macOS) returns Permission denied, please try again.
· The password is absolutely correct (I reset it multiple times).
· It happens for all users with full rights (including newly created test users).
· Even after completely disabling the firewall (/ip firewall filter disable [find]) the problem persists.
· Key‑based authentication also fails (keys imported, but still denied).
· I have tried:
· ip ssh set always-allow-password-login=yes
· user set admin password=...
· user set admin group=full
· user group set full policy=... (added ssh policy)
· Removing all SSH keys (user ssh-keys remove [find])
· Checking SSH service port and address restrictions – they are default (address="")
· Creating a brand new user (user add name=test group=full password=test123) – same issue
· Rebooting the router multiple times
What works:
· Winbox (MAC and IP) works fine.
· Telnet (temporarily enabled) works with the same credentials.
· REST API (with www-ssl) works.
· The router is reachable and responds to ping.
What does NOT work:
· SSH on port 22 (default) – always Permission denied.
Logs:
· /log print where topics~"ssh" shows nothing helpful – no failed login entries, just occasional "SSH login attempt" without errors.
· No firewall drop logs for port 22.
Attached outputs:
[admin@MikroTik] > /ip ssh print
ciphers: auto
forwarding-enabled: no
always-allow-password-login: yes
strong-crypto: no
host-key-size: 2048
host-key-type: rsa
[admin@MikroTik] > /ip service print where name=ssh
0 ssh 22 tcp main 20
[admin@MikroTik] > /user print where name=admin
0 admin full none
[admin@MikroTik] > /user ssh-keys print
(no keys present)
[admin@MikroTik] > /user group print
0 full local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,password,web,sniff,sensitive,api,romon,tikapp
What else should I check? Could it be a corrupted SSH host key? Or a hidden “login-by” property not visible in /user print? I'm considering resetting the router, but I would prefer to avoid that.
Any help is greatly appreciated.