The only place the “Publish” option in the right-click menu for an ArcGIS Server Connection is available is when it is listed under Catalog > Project > Servers.
If the same connection (AGS file) is moved to Favorites, the “Publish” option is no longer included.
If the exact same connection file is viewed under Catalog > Project > Folders, the “Publish” option is no longer included.
In response to BUG-000167223, Esri replied that this is by design, stating “To publish to a standalone server, add the server connection to your project.”
I don’t see how removing functionality on an element in the UI when it is viewed in certain places is “by design”. I would like to have my server connections for non-federated servers in one place with one instance of the AGS file in my file system. This is a cleaner approach for file management and it means I don’t have to update passwords for every instance I have strewn across projects if I were to take Esri’s recommended approach.