You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.
I'm filing this issue because exec works fine when I do gcloud ssh, meaning GCP probably doesn't read the ~/.ssh/config file for extra info. That means we probably shouldn't either.
WORKAROUND: Just make sure you don't have any Host matchers that can conflict with a GCP compute instance's host name. So for me that means removing the Host * matcher or changing it to something else like foo.
The text was updated successfully, but these errors were encountered:
I think my original thinking was that you could use ~/.ssh/config to change the user, because we don't provide a CLI option for that with wexec. But we should also behave consistently with gcloud ssh, so I'm fine changing it to fix this.
Previously we supplied the user registered with GCP metadata as a
`FallbackUser`, which allowed a user's SSH config to change the user.
However this behavior is inconsistent with `gcloud ssh` and resulted in
default user entries (`Host *`) in SSH config breaking this
functionality.
Switch to using the user from GCP metadata as the canonical user for
login. If we later need to support changing that user, it should be a
new feature of the `wexec` command/API.
Fixespuppetlabs-toy-chest#725.
Signed-off-by: Michael Smith <michael.smith@puppet.com>
My SSH config file has a
Host *
line that sets the default user to root. GCP compute exec uses the user parsed from the GCE SSH files (see https://github.com/puppetlabs/wash/blob/master/plugin/gcp/computeInst.go#L113) and sets that user as the FallbackUser. Thus, the SSH transport will use theroot
user when SSH'ing into the instance (b/c it reads from ~/.ssh/config via https://github.com/puppetlabs/wash/blob/master/transport/ssh.go#L66-L69) instead of the user parsed from my GCE SSH files. Thus, Exec fails because I'm ssh'ing as the wrong user.I'm filing this issue because exec works fine when I do
gcloud ssh
, meaning GCP probably doesn't read the ~/.ssh/config file for extra info. That means we probably shouldn't either.WORKAROUND: Just make sure you don't have any
Host
matchers that can conflict with a GCP compute instance's host name. So for me that means removing theHost *
matcher or changing it to something else likefoo
.The text was updated successfully, but these errors were encountered: