-
Notifications
You must be signed in to change notification settings - Fork 313
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
missing username when the config remote.ssh.configFile
is empty
#10684
Comments
Hi! I would like to add to this issue. It seems that the SSH command that vscode executes just ignores any username input provided and setting the ssh config file doesn't really help everyone as @zWingz stated. My guess, @zWingz has the "User" field set inside their ssh config. I can see the following line in the logs even when a username is provided.
When the above command is executed without a specific username either in the ssh config or within the command, ssh defaults to the username of the host PC. This is counterintuitive behavior to expect a single Target to be limited to a single user within the config or share username with the host PC which is an SSH default. Seems to be a direct result of this set of changes. Kindly revert to 0.116.0 behavior. |
@ArenaGrenade i have provided my config file |
@zWingz Thanks for the detailed issue. Are you generating the hex-encoded JSON yourself? Upon my inspection it appears not to be generated by Remote - SSH as it has properties we would not serialize (or maybe haven't for quite some time). May I understand why you cannot encode the
I suppose I want to better understand why you would perform this step in daily usage (and not provide the user in the configuration itself)? "Clearing" the config will also default to whatever your machine's
Is |
Could you please share more detail (your SSH configuration and connection steps) where you feel this behavior is unintuitive? I presume |
A new pre-release build should be available shortly with a proposed fix. In the change, the extension will always check for user in the hex authority string and forward that, even if there's a matching configuration entry or conflicting port information in that configuration. I believe this will bring the behavior back to what you folks expected. Please give it a try and let me know if you have any feedback - thanks! |
this affect me too
|
@joshspicer it work on pre-release, thanks |
@braindevices For my understanding, is there a reason why you don't put |
Simply because I need to access the same server with different user names when doing different tasks. For security reasons, sysop usually doesn't allow us to switch user after login. |
@braindevices @ArenaGrenade - does the pre-release work as you expect? |
Validated that @braindevices 's repro steps are fixed in the pre-release ![]() |
Please comment if anything seems out of place in the pre-release still. This change will also be released when 0.117.1 stable is released. |
yes thanks! |
Is there an existing issue for this bug?
Required Troubleshooting Steps
remote.SSH.useLocalServer
setting[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
Remote-SSH Log
Expected Behavior
version
0.117
i want to connect to the host
workspace7c8fc35xwrduptubl0@gz-GongfengIDE
with hex encodessh-remote+7b2275736572223a22776f726b7370616365376338666333357877726475707475626c30222c22776f726b73706163654964223a22776f726b7370616365376338666333357877726475707475626c30222c22686f73744e616d65223a22677a2d476f6e6766656e67494445222c22656e76223a2270726f227d
But it will lose the username, and connect to
gz-GongfengIDE
but in version
0.116
, or set theremote.SSH.configFile
to~/.ssh/config
. it work0.116
with configFile
Actual Behavior
connect to the host
Steps To Reproduce
0.117
remote.SSH.configFile
someone@host
Anything else?
my config file
The text was updated successfully, but these errors were encountered: