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.

ahmelsayed commented 5 years ago

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

zobo commented 5 years ago

@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 commented 5 years ago

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 commented 4 years ago

@zobo , new version worked like a charm 👍

ghost commented 4 years ago

@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 commented 4 years ago

@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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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

kotx commented 3 years ago

Any update on this?

tiernano commented 3 years ago

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 commented 3 years ago

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