Skip to content

Conversation

@Viknet
Copy link

@Viknet Viknet commented Mar 13, 2025

  1. Interpolation of Tokens for properties "HostName", "IdentityAgent", "IdentityFile", "ProxyCommand":
Host viknet
  Hostname %h-dev.microsoft.com
  IdentityAgent /var/tmp/ssh/%u-agent-socket
  IdentityFile %d/.ssh/id_rsa.pub
  ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
  1. Better parsing Host section line, when it has several values:
Host github.com gitlab.com *.microsoft.com
  1. Type safety for computed HostConfiguration

@AGI-chandler
Copy link

I found the extension was unable to parse my ~/.ssh/config in the same way ssh command can.
ℰ.ℊ. using a config such as:

# Global options
IdentitiesOnly yes
# Domain options
Host *.domain.com
  IdentityFile ~/.ssh/id1
  IdentityFile ~/.ssh/id2
  IdentityFile ~/.ssh/id3
# Host options
Host host1
  Hostname host1.domain.com
  User user1
  Port port1

In the terminal ssh host1 connects to the defied [email protected]:port1 using the first of the specified IdentityFile's that works and disconnects if none work, never prompting for a password. Whereas, in Codium with this extension, if I tell it to connect to "host1" it will connect to [email protected]:port1 but it does not try any of my IdentityFile's and falls back to password auth.  The conclusion is the extension only uses the most specific options for a host (or the last matching block?).

I found that if I made a new config block with all the required options, ℯ.ℊ.:

Host vsc-host1
  IdentitiesOnly yes
  IdentityFile ~/.ssh/id1
  IdentityFile ~/.ssh/id2
  IdentityFile ~/.ssh/id3
  Hostname host1.domain.com
  User user1
  Port port1

then tell the extension to connect to "vsc-host1" it will work properly without asking for a password.

Does your pull request address this, so connecting to "host1" works as expected, and no need for separate "vsc-host1" config block?  Or, I have a different issue I should report separately?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants