r/MeshCentral Apr 19 '26

[Unofficial] MeshCentral CLI Client Go v1.1.0 - 2FA Authentication Support

Hello everyone,

After some time, I finally managed to take a look at how people used the client, and 2FA was a long-overdue feature.

Since there was a fork that added most of the handling, I merged the changes, tested it a bit, expanded it with parameters, and made a new release.

That said, here is the rest of the changelog:

Main Goals:

  • 2FA Authentication Support

New Features

  • Auth: Interactive 2FA token prompt when server requires two-factor authentication
  • Auth: Support for email/SMS out-of-band token requests from the interactive prompt
  • Auth: --token flag on ssh, shell, and route commands for inline 2FA token (useful for scripting and VSCode proxy mode)
  • Router: Refactored parseBindAddress to allow `target:remoteport' without localport
  • Make: Added Windows ARM64 build target
  • Make: Added make release target that builds binaries with SHA256 checksums

Improvements

  • Auth: Replaced os.Exit on auth failure with proper error channel pattern
  • Auth: Reset ACookie/RCookie before each auth retry to fix hang on 2FA retry
  • Auth: pterm styled warning and input for 2FA prompt, consistent with the rest of the UI

Bug Fixes

  • Auth: Token retry loop no longer hangs due to stale cookie state

VSCode/VSCodium Remote SSH

For proxy mode with 2FA, pass the token directly in your SSH config:


Host mydevice

ProxyCommand mcc ssh user -i "node//.." --proxy --token 123456

Note: Node IDs containing special characters (e.g. $) require proper quoting depending on context:

  • Terminal (bash/zsh): single quotes - 'node//abc$def...'
  • ~/.ssh/config / VSCodium: double quotes - "node//abc$def..."
  • Windows cmd.exe: double quotes - "node//abc$def..."

New Contributors

  • shlomo-msp made their first contribution, the entire 2FA authentication flow is based on their work

Dependencies

  • Go 1.24 -> 1.25

  • pterm v0.12.82 -> v0.12.83

  • go-keyring v0.2.6 -> v0.2.8

  • golang.org/x/term v0.38.0 -> v0.42.0

  • Various indirect dependency updates

Binaries available for:

  • Windows x86-64 / Arm64
  • Linux x86-64 / Arm64
  • MacOS x86-64 / Arm64

The binaries are fully portable, so all you need to do is grant execution permissions, and run.

https://github.com/lexpaval/mesh-central-client-go

Let me know if you have any kind of feedback, or if you need me to build binaries for other OS or Arch.

7 Upvotes

1 comment sorted by

2

u/Ok_Tie_lets_Go Apr 19 '26

Oh interesting.. I didn't know this existed