transport/connection-refused
The device (or something in front of it) refused the TCP connection: nothing is listening on that port, the RouterOS service is disabled, or a firewall rejects it. No command reached RouterOS.
Typical triggers
- REST (
rest-api): thewww/www-sslservice is disabled, or the port is wrong. REST rides the web service, 80 for HTTP and 443 for HTTPS. - Native API (
native-api): theapiservice (8728) orapi-ssl(8729) is disabled. - SSH (
ssh, sftptransfer,terminal): thesshservice (22) is disabled. - A port forward or local tunnel (for example a quickchr VM) points at the wrong guest port.
REST and SSH/SFTP refusals name what was dialed in
context.host, context.port and
context.via; a native API refusal names the endpoint in its
summary.
Fix
- Check the services:
/ip service printon the router. Enable the one you need (/ip service enable api) and confirm its port andaddress=list. - Pin the port that is open:
--port, or a per-service CDB key such asapi-port=orwww-ssl-port=. - Try another transport:
--via native-api,--via rest-apior--via ssh. centrs <command> … --format jsonshows which setting chose the host, port and transport, inmeta.settings.