Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Windows support #87

Open
radix opened this issue May 3, 2017 · 65 comments
Open

Windows support #87

radix opened this issue May 3, 2017 · 65 comments

Comments

@radix
Copy link

radix commented May 3, 2017

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
Copy link
Contributor

kcking commented May 3, 2017

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
Copy link

Babun?

@radix
Copy link
Author

radix commented May 4, 2017

@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
Copy link
Contributor

kcking commented May 4, 2017

Ok great, I'll look into integrations for these

@clarkd
Copy link

clarkd commented May 8, 2017

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

@kbzowski
Copy link

kbzowski commented May 8, 2017

Putty/Pageant +1

@steveklabnik
Copy link

Another Putty user here.

@orclev
Copy link

orclev commented May 18, 2017

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

@xIGBClutchIx
Copy link

Any updates on this support? @kcking

@kcking
Copy link
Contributor

kcking commented Jul 9, 2017

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
Copy link

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

@kcking
Copy link
Contributor

kcking commented Nov 15, 2017

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
Copy link

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

@kcking
Copy link
Contributor

kcking commented Dec 12, 2017

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 PowerShell/Win32-OpenSSH#355 to see when ProxyCommand support is added, but we'll also be considering our previous alternatives if this takes too long.

@themegabyte
Copy link

+1 for Putty please

@kcking kcking changed the title Any chance of the ssh agent working on windows? Windows support Jan 15, 2018
@clarkd
Copy link

clarkd commented Mar 1, 2018

@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
Copy link
Contributor

kcking commented Mar 1, 2018

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
Copy link

awonglk commented Jun 25, 2018

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
Copy link

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
Copy link

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
Copy link
Contributor

kcking commented Aug 1, 2018

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
Copy link

rcdailey commented Dec 1, 2018

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
Copy link
Contributor

Is support for windows available now Without WSL?

@jasperweiss
Copy link

@itsbhanusharma

Is support for windows available now Without WSL?

Yes that’s already supported

@JaseHadd
Copy link

@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
Copy link

@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
Copy link

ReK42 commented Feb 8, 2019

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

@ghost
Copy link

ghost commented Feb 12, 2019

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

@mwmahlberg
Copy link

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

@ahmelsayed
Copy link

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
Copy link

zobo commented Oct 13, 2019

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
Copy link

zobo commented Oct 13, 2019

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

@zobo
Copy link

zobo commented Oct 21, 2019

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
Copy link

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
Copy link

shanselman commented Oct 22, 2019 via email

@zobo
Copy link

zobo commented Oct 22, 2019

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
Copy link

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
Copy link

shanselman commented Oct 23, 2019 via email

@panicsteve
Copy link

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
Copy link

zobo commented Oct 25, 2019

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
Copy link

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
Copy link
Contributor

@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.

@ahmelsayed
Copy link

Didn't realize that you can change the hostname on the app. Thanks @agrinman! :)

@zobo
Copy link

zobo commented Oct 31, 2019

@ahmelsayed WSL and win can communicate over UNIX sockets (see one example in this problem domain: https://github.com/vuori/weasel-pageant). So I'd guess it would be possible to have KRD running on windows and KR, KRSSH in WSL. There is some other communication going on between KRSSH and KRD I'd need to look at in more detail.. In theory you could redirect the agent socket to KRD on win now and it should work to some extent.. I'll try it as soon as I can...

@zobo
Copy link

zobo commented Nov 6, 2019

Fixed last build that fails when SSHing: https://github.com/zobo/kr/releases/tag/kr-2.4.15-win3
Maybe you'll need to remove quotes in ProxyCommand from your .ssh/config.

@PeterStaev
Copy link

@zobo , new version worked like a charm 👍

@ghost
Copy link

ghost commented Nov 26, 2019

@zobo that is great! Do you plan on maintaining builds?

What we need now is scoop install kr or scoop install kryptco-kr. I can work on the json to submit to scoop but there should be a Windows release repo

@zobo
Copy link

zobo commented Nov 26, 2019

@matticala Hey. I'm in talks with the authors to get it officially released... I personally haven't used scoop yet, but will take a look at it. But first need to get the patch ready to be merged.

@xsharing
Copy link

xsharing commented Nov 17, 2020

I figured out how to do ssh over aws ssm with kryptonite.
(absolute - relative path, quotations are very sensitive)

Hope this will be a hint for how to use -p option in windows ssh_config file.

Host brabra-krssm
    User ec2-user
    HostName i-0eb11111111111111
    Port 22

Host *-krssm
    IdentityAgent \\.\pipe\krd-agent
    ProxyCommand  C:\ProgramData\chocolatey\bin\krssh.exe -p "aws.exe ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p --profile profilename" -h %h  

@xsharing
Copy link

I need to restart kr daemon in windows very often (maybe once in five minutes) by hitting "kr me" or "kr restart -> kr me" before ssh authentication.

I installed kr with chocolately. kr version 2.4.15.
windows is 1909.

does anyone have same problem?

@zobo
Copy link

zobo commented Nov 17, 2020

Hi!

I didn't know somebody made a Chocolatey package. Just research how to make a good deployment process for windows.
I did not see an issue where I needed to restart krd (daemon). Can you see if there's anything in the logs. I'll get back to you when I'm at the computer.

@xsharing
Copy link

@zobo where can I find the logs..? Since krd is running in the background, the logs never shows up in terminal. (since I'm mainly using linux/mac, I'm not familiar with windows, sorry)

@xsharing
Copy link

I need to restart kr daemon in windows very often (maybe once in five minutes) by hitting "kr me" or "kr restart -> kr me" before ssh authentication.

I found the log(.kr/krd)

krdKrypton ▶ krd launched and listening on UNIX socket
krdKrypton ▶ stopping with signal interrupt
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  accept unix C:\Users\horiu\.kr\krd-agent.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  accept unix C:\Users\horiu\.kr\krd-agent.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  accept unix C:\Users\horiu\.kr\krd-agent.sock: use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ accept error:  use of closed network connection
krdKrypton ▶ hostAuth accept error:  accept unix C:\Users\horiu\.kr\krd-hostauth.sock: use of closed network connection
krdKrypton ▶ controlServer return: accept unix C:\Users\horiu\.kr\krd.sock: use of closed network connection
krdKrypton ▶ krd launched and listening on UNIX socket
krdKrypton ▶ krd launched and listening on UNIX socket
krdKrypton ▶ open \\.\pipe\krd-agent: Access is denied.
krdKrypton ▶ open \\.\pipe\krd-agent: Access is denied.

@zobo
Copy link

zobo commented Nov 20, 2020

Just wanted to say I also see this in some cases and will investigate it.

@kotx
Copy link

kotx commented Apr 8, 2021

Any update on this?

@tiernano
Copy link

tiernano commented Apr 8, 2021

guessing given the announcment on the website that the dev stuff is community, and that its lower priority... until someone in the community is given checkin access to the repo and is allowed create builds, it wont be in a production build any time soon...

@zobo
Copy link

zobo commented Apr 8, 2021

Ya, seems like it... We'll see what happens. I use winkr infrequently and don't usually have problems with it. If there are well defined issues I can try to look at them...

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

No branches or pull requests