-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot execute command-line and remote command #10412
Comments
Could you please share your entire log? What version of the extension are you on? |
Below is a connection without (successful) and with (failed) a RemoteCommand. I am using Here is a connection (successful) without a RemoteCommand specified in my ssh config:
Here is a connection (failed) with
|
Apologies for the delay. Have you tried with |
When I set
Keep in mind that my Windows .ssh directory is a symlink to my WSL2 .ssh directory which allows vsc to see/use my WSL ssh configs, which is my way of solving the #937 issue. This workaround only works with
|
@joshspicer I found a user with a similar issue in #690 (comment) where he mentioned "the target host has to be removed from remote.SSH.remotePlatform list". After I removed my host from the remotePlatform list, it magically fixed my issue and I can connect and my RemoteCommand configuration is working as expected. Is this a bug? And if so, when can it be addressed? |
What remote platform are you selecting when you connect? What is your full SSH config for this host?
I'm trying to piece together how your setup looks so I can try to reproduce. Are you ssh'ing to a WSL instance? Thanks for the logs you shared. In your second log, i'm seeing that
|
I do think there's a bug here and plan to look into it next iteration |
I just replicated this on another system. Here are the steps I performed. Remote System:sudo useradd -m myuser
sudo passwd myuser # SHOULD ONLY ALLOW '/usr/bin/su' BUT USING 'ALL' FOR TESTING
echo "myuser ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/myuser Local System:ssh config:
vsc settings: "remote.SSH.useLocalServer": true,
"remote.SSH.enableRemoteCommand": true, Using the above, I was able to choose |
This issue was already discussed and reproduced in #481 but it looks like the issue was closed without being resolved and the issue still exists.
I have enabled
remote.SSH.enableRemoteCommand
andremote.SSH.useLocalServer
.Version Info:
I have configured the following in my ssh config:
When I try to "Connect to host", it throws the error:
When I manually run the command in CMD that vsc is running, I get the same error:
When I manually run the command in CMD without the
bash
command, it works and I am logged into the server as root as desired:The text was updated successfully, but these errors were encountered: