kryptco / kr

DEPRECATED A dev tool for SSH auth + Git commit/tag signing using a key stored in Krypton.
https://krypt.co/developers/
Other
1.59k stars 109 forks source link

Windows support #87

Open radix opened 7 years ago

radix commented 7 years ago

I'd love to be able to use Kryptonite, but I use Windows on my Desktop machine, and use native Windows tools.

I saw that there are people working to get kr working on Windows Subsystem for Linux (#54, #71), but it's not clear if that will work with my native Windows tools. For example, I'd love it if when I run git in a PowerShell or from vscode/atom/whatever IDE, if it could connect to the kr ssh agent for authentication.

kcking commented 7 years ago

This is a definite goal for us, perhaps in the next few weeks. In the meantime we should have WSL working tonight, but I realize that won't help you with Atom/vscode/etc.

Do you currently use puTTY on windows?

alien2003 commented 7 years ago

Babun?

radix commented 7 years ago

@kcking I don't use puTTY. Most of my ssh usage is via SourceTree, or git directly from PowerShell, but also occasionally OpenSSH directly from PowerShell.

kcking commented 7 years ago

Ok great, I'll look into integrations for these

clarkd commented 7 years ago

Would be great to get this - We currently use Putty/Pageant on Windows.

kbzowski commented 7 years ago

Putty/Pageant +1

steveklabnik commented 7 years ago

Another Putty user here.

orclev commented 7 years ago

One vote for plain git and git bash here. Pretty sure that version is based in mingw.

xIGBClutchIx commented 7 years ago

Any updates on this support? @kcking

kcking commented 7 years ago

A contributor is working on this behind the scenes! A bare-bones pageant replacement may be available in the next couple of weeks -- stay tuned! šŸ˜„

sebgrohn commented 6 years ago

Any update on this issue? :) I, too, would love to use this on Windows!

kcking commented 6 years ago

We are now working on the next teams product, and as a result have pushed support for windows to next year. Please stay subscribed to this issue for any updates regarding windows.

tiernano commented 6 years ago

now with Microsoft including OpenSSH in Windows 10 (1709), would love to see this working!

kcking commented 6 years ago

Exciting! I just tried out the ssh client and unfortunately it currently lacks support for RSA host keys as well as ProxyCommand (which has been scoped out of their initial release). Kryptonite uses ProxyCommand to verify the signature of the host you are connecting to. I'll be following this issue https://github.com/PowerShell/Win32-OpenSSH/issues/355 to see when ProxyCommand support is added, but we'll also be considering our previous alternatives if this takes too long.

themegabyte commented 6 years ago

+1 for Putty please

clarkd commented 6 years ago

@kcking It looks like ProxyCommand is now supported (if I've followed PowerShell/Win32-OpenSSH#355 correctly). Are we any closer to a Windows version?

Edit: Just noticed it was only released 8 hours ago, so I might be a little premature! šŸ˜Ø

kcking commented 6 years ago

Once ProxyCommand is fully released and OpenSSH is out of beta on Windows we'll be much closer, my rough estimate now is 2-3 months.

awonglk commented 6 years ago

Another Putty user.. but open to using OpenSSH if that is closer to being available. Great potential. My initial reaction when Kryptonite was, "Wow.. great product!".. and then soon, "oh.. doesn't work on Windows" :(

themegabyte commented 6 years ago

hey guys, any follow-up on this? Will we able to have kryptonite support on windows in the foreseeable future? Thank you very much

Arm1stice commented 6 years ago

I can confirm that you can use kr if you install Windows Subsystem for Linux, however Iā€™m not sure how close we are to a more ā€œnativeā€ solution.

kcking commented 6 years ago

WSL is currently the only supported method, but I am close to having a full build working on Windows. That being said I unfortunately still don't have a solid timeline for PuTTY/git bash/openssh integration

rcdailey commented 5 years ago

I'm going to ask the obvious question, is it really that hard to get this working for mingw64? I'm fine running this through Git Bash on Windows.

itsbhanusharma commented 5 years ago

Is support for windows available now Without WSL?

jasperweiss commented 5 years ago

@itsbhanusharma

Is support for windows available now Without WSL?

Yes thatā€™s already supported

JaseHadd commented 5 years ago

@itsbhanusharma

Is support for windows available now Without WSL?

Yes thatā€™s already supported

Is it? README.md still doesnā€™t mention Windows and no commits since last update (in August) mention Windows either

jasperweiss commented 5 years ago

@itsbhanusharma

Is support for windows available now Without WSL?

Yes thatā€™s already supported

Is it? README.md still doesnā€™t mention Windows and no commits since last update (in August) mention Windows either

Oops, I misread that. No not without WSL

ReK42 commented 5 years ago

+1 for a pageant stand-in, as I use putty as part of mRemoteNG in most of my workflows.

ghost commented 5 years ago

Once ProxyCommand is fully released and OpenSSH is out of beta on Windows we'll be much closer, my rough estimate now is 2-3 months.

Any news on this?

Windows 10 has openssh client support and it's possible to have fully compatible client using scoop. I am trying to achieve a full build on Windows command line using cmder. I even thought about using an ad-hoc Docker container to run git commands with kr but docker build does not support tty so it's impossible to pair at build stage

hosh commented 5 years ago

Any chance for a build for msys2?

mwmahlberg commented 5 years ago

The total silence on this issue, especially since Windows provides openssh support admittedly makes me a bit nervous about the state of the project.

jasperweiss commented 5 years ago

I think the developers are focusing their efforts on a new project (ApproveAPI) at the moment.

FernandoMiguel commented 5 years ago

@Bodup thanks for the pointer

shanselman commented 5 years ago

@kcking Let me know if I, or someone else from Microsoft can help. We've had OpenSSL for a while on windows.

agrinman commented 5 years ago

@shanselman I believe kr should work on WSL -- is this correct? Some folks a while back had asked for things like putty support or native windows tooling supports, but with the new terminal in Windows I'm not sure how relevant those interests are anymore.

JaseHadd commented 5 years ago

I fit one would definitely prefer to be able to use it outside of WSL. Itā€™s a pain to integrate through Windows applications, like remote ssh workspaces in Visual Studio Code.

shanselman commented 5 years ago

Ya I was talking to @panicsteve and there's definitely a need to get this working in Windows proper as well as in WS2

mwmahlberg commented 5 years ago

@agrinman Quite relevant. You would want the codesigning and authentication in native Windows applications as well, say Sourcetree.

ahmelsayed commented 5 years ago

FWIW I've been using it with WSL/WSL2 for a long time and it works flawlessly there.

Being able to use it with Windows' git.exe and ssh.exe outside of WSL environment would be great though for all the other Windows native tools that use the native git and ssh or applications that are non-WSL aware :)

zobo commented 5 years ago

I've managed to hack things together and get working ssh agent support on windows native. It uses the new pipe interface ssh auth sock. This means the native ssh.exe (openssh-portable from Microsoft) will work. Still need to implement fallback agent (also pipe transport), ssh_config manipulation and the whole ProxyCommand - not mandatory. I'll try to push a PR tomorrow.

zobo commented 5 years ago

The kryptco/go-crypto seems to be out of sync with the vendor dir. Opened up a PR for this https://github.com/kryptco/go-crypto/pull/1

zobo commented 5 years ago

Managed to bundle together everything done so far into a #286 . Built binaries available here: https://github.com/zobo/kr/releases/tag/2.4.15-win All files should be placed into one directory, then run kr pair ... Terminal was changed to VT mode, but you can also use the new Windows Terminal that supports by default.

panicsteve commented 5 years ago

Managed to bundle together everything done so far into a #286 . Built binaries available here: https://github.com/zobo/kr/releases/tag/2.4.15-win All files should be placed into one directory, then run kr pair ... Terminal was changed to VT mode, but you can also use the new Windows Terminal that supports by default.

Nicely done!

Using this, I'm able to ssh into a server using just Krypton and Windows 10's built-in ssh client.

ssh success

However, I'm not able to clone a repo from github -- Krypton never prompts me to authenticate.

git fail

I'm not super familiar with how Git for Windows interacts with ssh. I have a feeling I need to tell Git to use the Windows 10 ssh client, or something, but I'm not sure what I'm looking for. Any ideas?

shanselman commented 5 years ago

What is the output of "where ssh.exe" from the command line?

On Tue, Oct 22, 2019 at 2:07 PM Steven Frank notifications@github.com wrote:

Managed to bundle together everything done so far into a #286 https://github.com/kryptco/kr/pull/286 . Built binaries available here: https://github.com/zobo/kr/releases/tag/2.4.15-win All files should be placed into one directory, then run kr pair ... Terminal was changed to VT mode, but you can also use the new Windows Terminal that supports by default.

Nicely done!

Using this, I'm able to ssh into a server using just Krypton and Windows 10's built-in ssh client.

[image: ssh success] https://user-images.githubusercontent.com/196190/67333284-2788d100-f4d5-11e9-8d43-da2932c63ee4.png

However, I'm not able to clone a repo from github -- Krypton never prompts me to authenticate.

[image: git fail] https://user-images.githubusercontent.com/196190/67333290-29eb2b00-f4d5-11e9-81e3-e318e4a1710a.png

I'm not super familiar with how Git for Windows interacts with ssh. I have a feeling I need to tell Git to use the Windows 10 ssh client, or something, but I'm not sure what I'm looking for. Any ideas?

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kryptco/kr/issues/87?email_source=notifications&email_token=AAAAWTG2ZLKEDULPZLNK5PTQP5TPTA5CNFSM4DKADYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7GUXQ#issuecomment-545155678, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAWTEM2B6IXAME5H7LGALQP5TPTANCNFSM4DKADYYA .

zobo commented 5 years ago

Yes, this was also my experience in some other case. Git for windows usually comes bundled with its own ssh.exe and that caused a lot of headache.

> where ssh.exe
C:\Windows\System32\OpenSSH\ssh.exe

However, when running git.exe you probably end up using C:\Program Files\Git\usr\bin\ssh.exe. I'm not sure what sort of agent socket this uses (but not the pipe one).

I solved it by editing ~/.gitconfig

[user]
...
[core]
    sshCommand = C:/Windows/System32/OpenSSH/ssh.exe 

Ps @shanselman What you guys did with SSH and WSL is amazing.

Managed to bundle together everything done so far into a #286 . Built binaries available here: https://github.com/zobo/kr/releases/tag/2.4.15-win All files should be placed into one directory, then run kr pair ... Terminal was changed to VT mode, but you can also use the new Windows Terminal that supports by default.

Nicely done!

Using this, I'm able to ssh into a server using just Krypton and Windows 10's built-in ssh client.

ssh success

However, I'm not able to clone a repo from github -- Krypton never prompts me to authenticate.

git fail

I'm not super familiar with how Git for Windows interacts with ssh. I have a feeling I need to tell Git to use the Windows 10 ssh client, or something, but I'm not sure what I'm looking for. Any ideas?

panicsteve commented 5 years ago

Making that edit to .gitconfig worked for me too! Great!

I hope this can get merged into the main Krypton distribution. Thanks for working on it!

shanselman commented 5 years ago

YES!!! Where do we document this .gitconfig change to set people up for "it just works" out of the box success?

On Tue, Oct 22, 2019 at 4:02 PM Steven Frank notifications@github.com wrote:

Making that edit to .gitconfig worked for me too! Great!

I hope this can get merged into the main Krypton distribution. Thanks for working on it!

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kryptco/kr/issues/87?email_source=notifications&email_token=AAAAWTFQ3FSHKBF6BZ4BMSTQP6A7ZA5CNFSM4DKADYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7POVY#issuecomment-545191767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAWTBSW7B5KGOJMJ3Q773QP6A7ZANCNFSM4DKADYYA .

panicsteve commented 5 years ago

During installation of Git for Windows, it auto-detects if you have Putty/Pageant/Plink configs, and if so, gives you the option to set up Git to use those. It would be great if GFW could do something similar to detect Krypton and offer to automatically set up .gitconfig to use the Windows built-in ssh client. But obviously that's something we'd have to pursue separately with the GFW team.

zobo commented 5 years ago

Made an updated build if anyone wants to try. It will handle spaces in installation directory. But you should clean your ~/.ssh/config manually first. https://github.com/zobo/kr/releases/tag/2.4.15-win2

ahmelsayed commented 5 years ago

Using krypton on multiple WSL and Windows environments on the same machine confuses the iOS app because they all have the same hostname. Windows also resets WSL hostname on restart, so I'm not sure if there is a way to permanently change it.

To work around that, on WSL I do

sudo hostname $(hostname)-wsl
kr pair

the actual WSL hostname will revert next reboot/restart.

agrinman commented 5 years ago

@ahmelsayed -- you can also manually change the name of the paired device from within the iOS app. This way it won't overwrite the other pairing. Ideally a full windows kr installation would get these two types integrations to work as one.