Menu

#144 Allow SSH usernames containing spaces (e.g. Windows users like "tester tester")

closed
nobody
None
2026-04-23
2026-04-16
Anonymous
No

Originally created by: kumaakh

Problem

SSH usernames that contain spaces (e.g. tester tester) are valid on Windows and work correctly with PuTTY, but register_member rejects the connection with:

 Failed to connect to <host>:<port>  All configured authentication methods failed
Member was NOT registered.

Expected behaviour

Fleet should accept and correctly handle SSH usernames that contain spaces, consistent with how PuTTY and standard SSH clients treat them on Windows.

Steps to reproduce

register_member(
  friendly_name="odm-ssdev",
  host="utubovyu.users.openrport.io",
  port=29637,
  username="tester tester",   # Windows user with a space
  auth_type="password",
  work_folder="~/ODM"
)

Result: All configured authentication methods failed — member not registered.

Notes

  • The same host/port is reachable via PuTTY with tester tester as the username and correct password.
  • No code path in the fleet server appears to quote or escape usernames before passing them to the SSH library, which likely splits on whitespace and treats the second token as a different argument.

Related

Tickets: #146
Tickets: #169

Discussion

  • Anonymous

    Anonymous - 2026-04-23

    Originally posted by: kumaakh

    Fixed in main: PR [#177] (fix: SSH username with spaces + improved SSH error messages) confirmed that agent.username is passed directly to the ssh2 ConnectConfig.username field and is never shell-interpolated. The schema description for username in src/tools/register-member.ts was updated to explicitly note that spaces are allowed (e.g. tester tester on Windows). Unit tests for the SSH config path were added.

     

    Related

    Tickets: #177

  • Anonymous

    Anonymous - 2026-04-23

    Ticket changed by: kumaakh

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB