Hi,
We have an issue with SSH and radius login.
It is related to this topic:
1. Summary
When AAA/RADIUS is enabled for the login service and a user connects over SSH, RouterOS sends a full,
cryptographically valid MS-CHAPv2 Access-Request to the RADIUS server (which proxies to Active
Directory via ntlm_auth) before the interactive password prompt has been answered by the user. This
first request is consistently rejected by the backend (real NT STATUS_LOGON_FAILURE / 0xC000006D,
not a timeout or malformed packet). A second Access-Request, with a freshly generated
MS-CHAP-Challenge / MS-CHAP2-Response pair, follows a few seconds later (after the user actually
types and submits the password) and is accepted normally.
This causes every single interactive SSH login to generate two logon events against the domain controller:
one failure and one success. This is a real risk for account lockout policies and adds unnecessary
noise/load on the RADIUS and AD infrastructure.
2. Environment
RouterOS versions tested 6.49.1, 6.49.19, 7.8 -> identical behaviour
AAA config use-radius=yes, RADIUS service=login
RADIUS server FreeRADIUS, proxying to Active Directory
Client Windows OpenSSH client (ssh.exe), tested with PubkeyAuthentication=no and forced legacy MACs
Capture method tcpdump on the RADIUS server correlated with a screen capture
3. Steps to reproduce
- Configure /radius with service=login pointing to a working FreeRADIUS server (AD backend via
MSCHAPv2/ntlm_auth). - Enable AAA use-radius=yes for the login service (System > Users > AAA).
- Open a fresh terminal (no previous connection attempts, no keys typed in the console beforehand).
- Connect: ssh user@domain@routeros-ip
- Wait for the password prompt. Do NOT type anything yet.
- Watch the RADIUS server log / a tcpdump capture on UDP 1812 in parallel.
4. Observed evidence
4.1 Wireshark capture on the RADIUS server (UDP 1812/1813)
No. Time Source Destination Protocol Info
1 0.000000 10.74.0.6 10.47.102.79 RADIUS Access-Request id=242 (User-Name=XXXXX ....
2 1.255904 10.47.102.79 10.74.0.6 RADIUS Access-Reject id=242 (MS-CHAP-Error: E=691 Authentication ....
3 7.119017 10.74.0.6 10.47.102.79 RADIUS Access-Request id=243 (same User-Name, NEW MS-CHAP-Challenge/......
4 7.332066 10.47.102.79 10.74.0.6 RADIUS Access-Accept id=243....
... pattern repeats identically for two further SSH login attempts (id=246/247 and id=250/251),
always: 1st Access-Request -> Access-Reject, 2nd Access-Request (fresh MS-CHAP-Challenge) -> Access-Accept.
4.2 FreeRADIUS log, same user/timeframe
Thu Sep 17 17:14:52 2026 : Auth: (15907776) Login incorrect (mschap: Program returned code (1) and output
'The attempted logon is invalid. This is either due to a bad username or authentication information. (0xc000006d)'):
[XXXXX@domain.local] (from client X.X.X.X port 0 cli X.X.X.X) from IP X.X.X.X
5. Analysis
The rejected and accepted Access-Requests are not retransmissions of the same packet: each carries a
different, freshly generated MS-CHAP-Challenge and MS-CHAP2-Response, meaning RouterOS
performs two independent full authentication rounds per SSH login. The first round uses a credential
already known to RouterOS at connection time (before the interactive prompt is answered), which is
rejected by the domain controller with a genuine STATUS_LOGON_FAILURE, not a network-level failure.
The second round, seconds later, uses the credential actually typed by the user and succeeds.
The behaviour is identical on 6.49.1, 6.49.19, and 7.8.
6. Why this matters
- Every interactive SSH login against RADIUS/AD generates one extra, real failed-logon event on the
domain controller before the user has even typed a password. - On environments with a low account-lockout threshold, this materially reduces the number of genuine
mistyped attempts a user can make before being locked out. - It adds avoidable load/noise to RADIUS and AD authentication logs, complicating security monitoring.
7. Request to the community / MikroTik
Has anyone identified the root cause of this behaviour inside RouterOS's SSH/AAA client, or a supported
configuration option to suppress this first, premature authentication round?