Open PlethoraChutney opened 2 weeks ago
What is node_b
, that's a hostname?
which breaks the existing config
How does it break the existing config?
Or was it already an entry in the ssh config?
Yes, sorry, that's a hostname. We have existing entries in the ssh config which correctly route hostnames matching a pattern through a login node, so adding an entry specifically matching that hostname prevents that routing from working.
More explicitly, here's what's essentially in .ssh/config:
Host login
HostName login.domain
Host node_*
ProxyCommand ssh login -W %h:%p
Hostname %h.domain
So adding the HostName lines breaks the -W
routing through login.domain
.
Got it. This is a fairly common scenario but I've never been sure how to handle it. At times we've thought about trying to show Host entries with wildcards in the Remote Explorer, and do something like ask you for the full name when you click on it. Do you think that would help?
Maybe we could rename the command, have to say "Add New Host To SSH Config File" because the file can be in different locations, but then it doesn't seem specific enough to help with understanding.
Maybe https://github.com/microsoft/vscode-remote-release/issues/7801 is a good issue to link.
Yes, I think that would probably help!
I think even simpler, though, it would go a long way to make it clear that you can type a hostname directly into the dialog to use its existing entry. I know this is outside your control, but other very similar looking dialogs (the python interpreter selection dialog comes to mind) require you to pick an option from the list or explicitly add one. I think this trains users (at least our users) to think of this type of dialog as an exhaustive list of options.
I know it says something to this effect in the text field itself: but (and sorry for the incoming pedantry)
So, even though it would somewhat be a duplication of functionality, maybe adding an explicit option like "Connect by hostname" or something?
Thanks for taking this issue seriously! I know it's not broken per se, so I appreciate your time!
In the "Remote-SSH: Connect to Host..." dialog, I'd like to suggest/request that the "Add New SSH Host..." option is renamed.
We recently had to change which node of a cluster we log into from
node_a
tonode_b
. To connect tonode_b
, 100% of VS Code users (including myself 🙃) clicked "Add New SSH Host..." and enterednode_b
. This causes VSC to add the useless linesto the top of
~/.ssh/config
, which breaks the existing config. Now users can't even SSH intonode_b
from the terminal, which was working before attempting to connect using VSC.Users were all surprised to learn you could simply type
node_b
into the "Connect to Host..." dialog, and that this was not considered "adding a new host".I think this confusion would be resolved if the dialog included a line like "Enter hostname" and a separate line named "Add new host to .ssh/config". The latter would have the functionality that's currently under "Add New SSH Host..."
Thank you!