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

Use case: Windows' new ssh client #53

Open
ghost opened this issue Dec 23, 2017 · 6 comments
Open

Use case: Windows' new ssh client #53

ghost opened this issue Dec 23, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2017

Microsoft have added a port of OpenSSH to the preview editions of Windows - you can grab it without being in the beta via https://github.com/PowerShell/Win32-OpenSSH/releases

I tried using ssh-pageant as a "bridge" (because I still need to use Pageant for Filezilla) but I get the following error after setting $env:SSH_AUTH_SOCK and running ssh-add -L

error fetching identities: invalid format

@cuviper
Copy link
Owner

cuviper commented Dec 23, 2017

Has Microsoft published the sources for openssh as they're shipping it? We'd need to see how they're using SSH_AUTH_SOCK and imitate that. (I doubt it's the same as Cygwin's version of unix sockets.)

@cuviper
Copy link
Owner

cuviper commented Dec 23, 2017

Oh, that was a silly question... the link you gave is the source.

@cuviper
Copy link
Owner

cuviper commented Dec 23, 2017

Oh wow, they've actually implemented AF_UNIX:
https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/

Beginning in Insider Build 17063, you’ll be able to use the unix socket (AF_UNIX) address family on Windows to communicate between Win32 processes.

AFAICT they're depending on this in Win32-OpenSSH. There are a lot of compatibility hacks -- see all the WIN32_FIXME in the source -- but it's still using AF_UNIX sockets for the agent. If you're not using the insider build, are you able to use their own ssh-agent successfully?

I don't expect the current Cygwin/MSYS builds of ssh-pageant will be able to talk to this. Cygwin has implemented their own version of AF_UNIX for a long time, surely incompatible with this new thing. Perhaps eventually Cygwin will adopt that native AF_UNIX. But I do think it should also be possible to make a native (non-Cygwin/MSYS) ssh-pageant that works with that new AF_UNIX support.

I don't plan on updating my own machine to any pre-release Windows though, so it may be a while before I can work on this.

@ghost
Copy link
Author

ghost commented Dec 23, 2017

Seconding your wow, there.

I'm only on 1703, but after installing the SSH agent service (see their ps1 scripts) I was able to use the agent on Windows.

@coldacid
Copy link

coldacid commented Apr 7, 2018

@cuviper They're actually using Windows named pipes for IPC instead of Unix sockets, which is why neither ssh-pageant nor gpg-agent works with it so far. See PowerShell/Win32-OpenSSH#827

@rupor-github
Copy link

There is indirect descendant of this project: https://github.com/rupor-github/ssh-agent-wsl which talks to Windows ssh-agent from WSL - you may be able to adopt its "named pipe" part here.

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

No branches or pull requests

3 participants