I have a server running Ubuntu 24.02. The server currently has a user named alpha
, and when a client inputs ssh [email protected]
into their terminal, they are instantly logged in - no password required - and served an interactive application using ForceCommand
. However, my goal is for this behavior to occur without having to specify a username, so that typing ssh mydomain.net
would do the same behavior. I'm unsure as to how to counteract the behavior that automatically attempts to login using the local machine's username, and I don't wish to require end users to modify their SSH config.
The behavior is similar to terminal.shop - if one types ssh terminal.shop
it will automatically serve the application to them without requiring a username to be specified.
Would it also be possible to have a default case where if no username is specified for the connection, they will be served the interactive application, but if a username is specified (such as administrator of the website logging in to perform maintenance tasks) then it will attempt to login to that specific user instead?
Thanks for the help!
any_word
will be expended to[email protected]
. Then the user could typessh any_word
.terminal.shop
you are mentioning probably works in such a way that it accepts any username. Maybe it is possible to configure such behavior using options insshd_config
file. You have to read the man page on that and experiment.