a lot of apps have this kind of silly pattern, but they are usually trivial and non-valuable things especially before you set them up.
the default should be that it writes a token to the terminal, that you have to use to set the password. unless the SSH connection is breached this prevents this kind of bootstrap snipe attack.
if you have ever set up SSH on a VPS and looked at the logs, you will see there is probably tens of thousands or more bots on the internet scanning and probing everything they can find.
they now have claude, to help them with this, not sure if you caught the news but they discovered that some clever guys were using claude to automate breaching of servers on the internet, that were far more sophisticated and fast than any such exploit ever seen before.
at this point, it's pretty much game over. nothing should be open to connections on the internet without a back channel lock.