auth/failed
Batch SSH authentication failed. This code comes from the batch SSH
clients: execute --via ssh and sftp transfer.
Logins over REST, the native API and MAC-Telnet fail as transport/auth-failed.
Typical triggers
- No key the device accepts for that user. Batch SSH never sends a
password: it authenticates with
--ssh-key(orCENTRS_SSH_KEY, or the CDBssh-key=key), plus the keys in your OpenSSH configuration or agent. - The user's group lacks the
sshpolicy. RouterOS then refuses the login withPermission denied (publickey). - The selected key file does not exist. OpenSSH prints
no such identity, and centrs reportsauth/failedfor that message whatever the device did.
context.sshKeySelected says whether an explicit key was
chosen; the cause data holds OpenSSH's own message.
Fix
- Install the matching public key for the user on the device:
/user/ssh-keys import(/user/ssh-keys printlists the user's keys). - Confirm the user's group has the
sshpolicy (/user group print). - Password login is separate. On RouterOS 7.21 and later,
/ip/ssh password-authentication(defaultyes-if-no-key) refuses it for a user who has a key. Use--via rest-apior--via native-apito log in with a password.