Skip to content
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

Can't connect reliable when using ssh + password #629

Closed
aseques opened this issue Jun 9, 2019 · 7 comments
Closed

Can't connect reliable when using ssh + password #629

aseques opened this issue Jun 9, 2019 · 7 comments
Labels
info-needed Issue requires more information from poster ssh Issue in vscode-remote SSH

Comments

@aseques
Copy link

aseques commented Jun 9, 2019

  • VSCode Version: 1.35
  • OS Version: Windows 10

Steps to Reproduce:

  1. Enable ssh authentication via password (remote.SSH.showLoginTerminal)
  2. I can connect normally but having to enter the password so many times is a pain
  3. Modify the config file to include the master configuration (instructions)
  4. I get this when starting a new connection

Install and start server if needed

getsockname failed: Not a socket
packet_write_poll: Connection to UNKNOWN port -1: Permission denied

"install" terminal command done
Received install output: packet_write_poll: Connection to UNKNOWN port -1: Permission denied
Failed to parse remote port from server output: packet_write_poll: Connection to UNKNOWN port -1: Permission denied

If I am already connected when I add the ControlMaster configuration then it works as expected, I can go for all the session working without issues.
Instead, if I open the session on a fresh visual studio core setup, then I can't connect, and I'm getting the above message.

@vscodebot
Copy link

vscodebot bot commented Jun 9, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@egamma egamma transferred this issue from microsoft/vscode Jun 10, 2019
@egamma egamma added the ssh Issue in vscode-remote SSH label Jun 10, 2019
@roblourens
Copy link
Member

Can you include the full log?

@roblourens roblourens added the info-needed Issue requires more information from poster label Jun 13, 2019
@aseques
Copy link
Author

aseques commented Jun 13, 2019

I posted what I found in the screen, do you mean the log from the plugin, vscode? I am not at home right now, you mean this https://stackoverflow.com/a/54381900/322049?

@roblourens
Copy link
Member

roblourens commented Jun 13, 2019

I mean the full log from the "Remote - SSH" output channel:

image

@DonEstefan
Copy link

I have the same problem. Remote-ssh Log is like this:

remote-ssh@0.42.2
Confirming that playground8 is a valid reachable host
Running type "C:\Users\edited\AppData\Local\Temp\vscode-linux-multi-line-command-playground8.sh" | ssh  "playground8" bash to confirm the host platform
> 
> getsockname failed: Not a socket
> packet_write_poll: Connection to UNKNOWN port -1: Permission denied
> 
"uname" terminal command done
playground8: unreachable or not Linux x86_64. (packet_write_poll: Connection to UNKNOWN port -1: Permission denied)

Problem disappears as soon as I remove the ControlPath ~/.ssh/sockets/%r@%h-%p option from my ssh client config.
It seems like windows integrated ssh has a general problem with multiplexed ssh. At least on my hosts (win10 with current patch level). Currently I can not make ssh work while ControlPath option is set. No wonder that vscode-remote throws an error.

My ssh config is

Host playground8
    HostName "192.168.1.1"
    User root
    ControlMaster auto
    ControlPath  ~/.ssh/sockets/%r@%h-%p
    ControlPersist  600

@roblourens
Copy link
Member

Yeah, ControlPath is not supported on Windows. I think this was the OP's issue too.

@aseques
Copy link
Author

aseques commented Jun 20, 2019

After a few days using vscode, now it's working normally, I can isolate if there was a fix the resolved the issue (i got an update for vscode and applied it, but there where no mentions of ssh in the changelog).
Maybe the socket was left in an unclean state (i recall having deleted the subfolder that might have helped too)
Thanks anyway

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

4 participants