Skip to content
MikroTik RouterOS Docs

Special Login - Serial Port Proxy Access

Create a user that connects directly to a serial port via SSH, bypassing RouterOS login.

# Disable console on serial port
/system/console disable [find port=serial0]
# Create special-login user
/user add name=serial group=full
/special-login add user=serial port=serial0

Access from remote machine:

Terminal window

What this does: Special Login creates a user account that, when accessed via SSH or Telnet, connects directly to a serial port instead of the RouterOS CLI. This allows you to manage devices connected via serial cable (switches, modems, other routers) through a MikroTik router acting as a serial proxy.

When to use this:

  • Managing a switch or device with only serial console access
  • Remote access to equipment in hard-to-reach locations (towers, remote sites)
  • Providing serial console access to a team without RouterOS credentials
  • Accessing devices that have no network interface (serial-only equipment)
  • Managing modems, radio links, or industrial equipment via RS-232

How it works:

  1. MikroTik router connects to target device via serial cable
  2. You configure a special-login user bound to that serial port
  3. When you SSH to the router with that username, you’re connected directly to the serial device
  4. RouterOS acts as a transparent serial proxy

Prerequisites:

  • Serial cable connecting MikroTik to target device (null-modem for router-to-router)
  • Serial port available (built-in or USB-to-serial adapter)
  • Target device configured for serial console access
  • SSH or Telnet enabled on RouterOS
MenuPurpose
/special-loginConfigure special login entries
/portView and configure serial ports
/system/consoleManage console bindings to ports
/system/serial-terminalDirect serial terminal access (testing)
ConnectionCable TypeDescription
Router to RouterNull-modemTX/RX crossed (pins 2-3 swapped)
Router to SwitchNull-modemMost Cisco-style console ports
Router to ModemStraight-throughDTE to DCE connection
PortDescription
serial0Built-in RS-232 serial port
usb1First USB serial adapter
usb2Second USB serial adapter
serial-usb-1USB serial (alternative naming)

View available ports:

/port print

View available serial ports:

/port print

Example output:

Flags: I - INACTIVE
# NAME CHANNELS USED-BY BAUD-RATE
0 serial0 1 serial-con 115200

Check current settings:

/port print detail

If needed, adjust baud rate to match target device:

/port set serial0 baud-rate=9600

By default, RouterOS uses serial0 for its console. You must unbind it first:

/system/console print

Example output:

Flags: X - DISABLED, U - USED, F - FREE
# PORT TERM TX-BYTE RX-BYTE
0 serial0 vt102 0 0

Disable the console binding:

/system/console disable [find port=serial0]

Or by number:

/system/console disable 0

Loss of Serial Console Access

After disabling the console on serial0, you cannot access RouterOS via the serial port. Ensure you have network access (SSH, WinBox, WebFig) before proceeding. If you lose network access, you may need to reset the router configuration.

Create a dedicated user:

/user add name=serial group=full password=secretpass

Security tip: You can create a restricted group if the user only needs serial access:

/user/group add name=serial-only policy=ssh,read
/user add name=serial group=serial-only password=secretpass

Bind the user to the serial port:

/special-login add user=serial port=serial0 disabled=no

Verify the configuration:

/special-login print

Example output:

Flags: X - DISABLED
# USER PORT
0 serial serial0

After reboot with a serial cable attached, the connected device may send characters that trigger the RouterBOOT menu, preventing normal boot.

Access bootloader settings:

/system/routerboard/settings print

Change boot key from “any” to “delete”:

/system/routerboard/settings set enter-setup-on=delete-key

From the router (direct test):

/system/serial-terminal serial0

Press Ctrl-A then Q to exit.

From remote machine:

Terminal window

You should see the target device’s console directly.

Connect a Cisco switch to a MikroTik router via serial:

# Disable RouterOS console
/system/console disable [find port=serial0]
# Set port speed to match switch (typically 9600)
/port set serial0 baud-rate=9600
# Create user
/user add name=switch group=full password=secretpass
# Configure special login
/special-login add user=switch port=serial0
# Prevent boot issues
/system/routerboard/settings set enter-setup-on=delete-key

Access from your workstation:

Terminal window

Connect multiple devices using USB-to-serial adapters:

# Check available USB serial ports
/port print
# Create users for each device
/user add name=switch1 group=full password=pass1
/user add name=switch2 group=full password=pass2
/user add name=modem group=full password=pass3
# Bind each to a different port
/special-login add user=switch1 port=usb1
/special-login add user=switch2 port=usb2
/special-login add user=modem port=usb3

Access each device:

Terminal window
ssh [email protected] # Connects to first USB serial
ssh [email protected] # Connects to second USB serial
ssh [email protected] # Connects to third USB serial

Give a technician serial access without full RouterOS access:

# Create restricted group
/user/group add name=serial-access policy=ssh,read
# Create technician user
/user add name=tech-serial group=serial-access password=techpass
# Configure special login
/special-login add user=tech-serial port=serial0

The technician can SSH and access only the serial device, not RouterOS.

Connect two MikroTik routers (R1 and R2) via serial cable:

On R1 (proxy router):

# Disable console
/system/console disable [find port=serial0]
# Create user for R2 access
/user add name=r2-console group=full password=secretpass
# Configure special login
/special-login add user=r2-console port=serial0
# Prevent boot issues
/system/routerboard/settings set enter-setup-on=delete-key

On R2 (target router): Serial console works with default settings. Ensure baud rate matches (default 115200).

Access from workstation:

Terminal window
ssh r2-console@[R1-IP]
# You're now on R2's console

When connected via special-login, use these keyboard shortcuts:

Key SequenceAction
Ctrl-A, QQuit connection (return to SSH client)
Ctrl-A, BSend break signal
Ctrl-A, ASend Ctrl-A to device
Ctrl-A, RAuto-configure baud rate
PropertyTypeDefaultDescription
userstring(required)Username that triggers special login
portstring(required)Serial port to connect to
channelinteger0Channel number for multi-channel adapters
disabledyes / nonoDisable this entry
PropertyTypeDefaultDescription
baud-rateinteger / auto115200Connection speed
data-bits7 / 88Data bits per character
paritynone / even / oddnoneError detection
stop-bits1 / 21Stop bits per character
flow-controlnone / hardware / xon-xoffhardwareFlow control method

For scripted or automated serial communication, consider /port remote-access instead:

/port/remote-access add port=serial0 protocol=raw tcp-port=9999 allowed-addresses=192.168.88.0/24

Access via netcat:

Terminal window
nc 192.168.88.1 9999
FeatureSpecial LoginRemote Access
AuthenticationSSH/Telnet userIP-based (firewall)
ProtocolSSH/TelnetRaw TCP or RFC2217
ScriptingDifficultEasy (netcat, etc.)
User permissionsPer-userPer-IP range
/special-login print

Expected: Your entry with user and port shown.

/system/console print

Expected: Entry for serial0 shows X (disabled) flag.

/port print detail

Expected: Port shows correct baud-rate and is not “used-by” console.

/system/serial-terminal serial0

Expected: You see the target device’s output. Press Ctrl-A, Q to exit.

From remote machine:

Terminal window

Expected: Direct connection to serial device, not RouterOS CLI.

SymptomCauseSolution
SSH connects to RouterOS instead of serialSpecial login not configured for userVerify /special-login print shows entry
”Port is used by another process”Console still bound to portDisable console: /system/console disable 0
No output from serial deviceBaud rate mismatchMatch baud rate: /port set serial0 baud-rate=9600
Garbage characters on screenWrong parity or data bitsCheck target device settings; adjust port config
Router stuck at boot after rebootSerial cable sending characters to bootloaderSet /system/routerboard/settings set enter-setup-on=delete-key
USB serial not appearingAdapter not recognizedCheck /port print; try different USB port
Multi-channel adapter all go to channel 0Known issue with some adaptersUse separate single-channel adapters or remote-access
Lost all access to routerDisabled console without network accessReset router configuration via reset button

Common Mistakes

  • Disabling console before verifying network access - Always test SSH/WinBox access before disabling serial console
  • Forgetting to configure bootloader - Router may hang on reboot with serial cable attached
  • Baud rate mismatch - Most switches use 9600; RouterOS default is 115200
  • Using wrong cable type - Router-to-router requires null-modem cable
  • Not testing locally first - Use /system/serial-terminal before configuring special-login
CommandDescription
/special-login printList special login entries
/special-login addCreate special login entry
/special-login removeDelete special login entry
/special-login setModify special login entry
/port printList available serial ports
/port setConfigure port settings
/system/console printList console bindings
/system/console disableDisable console on port
/system/serial-terminalDirect serial terminal access

Special Login provides serial port proxy access through SSH/Telnet:

  1. Disable console on the serial port with /system/console disable
  2. Create user dedicated to serial access
  3. Configure special-login binding user to port
  4. Set bootloader to prevent boot issues with attached cables
  5. Test locally with /system/serial-terminal then remotely via SSH

Key points:

  • Disabling serial console removes that access method to RouterOS
  • Always verify network access before disabling console
  • Match baud rate to target device (usually 9600 for switches)
  • Configure bootloader to require Delete key for setup menu
  • Use null-modem cables for router-to-router/switch connections
  • For scripted access, consider /port remote-access instead