-
Notifications
You must be signed in to change notification settings - Fork 2k
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
How to enable ssh-agent? #193
Comments
same problem here, if someone is using this without problems i would appreciate a hint on how to set it up. |
I came up with this gist, which does the trick: https://gist.github.com/bojanrajkovic/6997145eda613467ace4. You can add this to init.bat. I'd love some input from @Bliker or someone else as to how to get this to run on "startup" without being overwritten by Cmder upgrades. |
Sweeet! Works as advetised :-) I would even go as far as making this an official option (perhaps not default, but an option nonetheless!) |
I wrote another solution for the problem which doesn't run ssh-agent for each new Cmder instance. It works without temporary files, only runs ssh-agent when it isn't running and adds ssh keys in %HOME%.ssh*_rsa if they were not yet added. |
Nice, that's much better than my hack. I've switched to Powershell + posh-git in the meantime (which has built-in support for ssh-agent), but this is a cool solution. |
Using the script from @bojanrajkovic it works for me. With @Shoozza's fix I only get: "Could not open a connection to your authentication agent". Strange, I don't see why the call to ssh-add shouldn't work in the second script as well. |
I get the same with @Shoozza 's fix also: |
Thanks, @Shoozza. It's working fine for me now 👍 |
You can add it to |
I added |
@Shoozza Cheers, this is fantastic. |
This need to be added to the repo ! |
I'm taking the liberty of notifying @Bliker directly. I hope he doesn't mind. This shoud be part of cmder for sure :D |
If someone adds a pull request to add the file there shouldn't be a problem. |
Adding agent-script to bin-folder and a commented out call in init.bat
I went ahead and made pull request #351, thanks everyone! |
Adding agent-script to bin-folder and a commented out call in init.bat
Adding script to enable SSH-agent #193
Based on your great solution, a script which loads keys into putty's pageant. Same as above add pageant helps those who want to use vagrant on windows with puppets vcsrepo to clone private git repos: hashicorp/vagrant#1735 thanks a lot for cmder :) |
It is working for me but the agent forwarding is not good |
With your script @teleivo and http://niki.hammler.net/wiki/PuttyAgent_now_supports_openssh/cygwin/msys |
has anyone successfully had confirmation with ssh-add working? ssh-add -c /path/to/key Adding is no problem, but you'll get a failure when connecting because there is no /usr/libexec/ssh-askpass. At least that's the issue that I've had in Ubuntu before. |
I am currently using |
@isdsc any idea how to make it enable agent forwarding? |
@markwint if the question is how
Here is my ssh configuration:
Here is how I use agent forwarding with a second identity to connect to GitHub. See GitHub for details.
However, just to make sure I understood what agent forwarding means, I googled it and found another explanation: http://www.unixwiz.net/techtips/ssh-agent-forwarding.html#fwd If your question is about this second interpretation, I don't know how to respond to your question because:
|
@isdsc regarding 2. no. it is not. if you've never chained ssh tunnels together then you've never used agent-forwarding. |
@teleivo, your option seems to be the one that would fit my eneeds best, but I get an error that >'pageant' is not recognized as an internal or external command, operable program or batch file.< even though the %PATH% has my "C:\Users.ssh" location listed in there... I edited the pageant_autostart.cmd file to list the full explicit path to pageant.exe and it works but i'm puzzled why cmder can't find pageant... |
Thanks, works great! |
(and some comments on the user-profile.cmd file) Inspired by the comments from cmderdev#193 and my personal need to use pageant instead of OpenSSH authentication agents (which is more Window user-friendly), I have used this approach which works as expected. Keeping the spirit of the current scripts, I left it disabled, and with some comments explaining what they all do.
(and some comments on the user-profile.cmd file) Inspired by the comments from #193 and my personal need to use pageant instead of OpenSSH authentication agents (which is more Window user-friendly), I have used this approach which works as expected. Keeping the spirit of the current scripts, I left it disabled, and with some comments explaining what they all do.
(and some comments on the user-profile.cmd file) Inspired by the comments from #193 and my personal need to use pageant instead of OpenSSH authentication agents (which is more Window user-friendly), I have used this approach which works as expected. Keeping the spirit of the current scripts, I left it disabled, and with some comments explaining what they all do.
(and some comments on the user-profile.cmd file) Inspired by the comments from cmderdev#193 and my personal need to use pageant instead of OpenSSH authentication agents (which is more Window user-friendly), I have used this approach which works as expected. Keeping the spirit of the current scripts, I left it disabled, and with some comments explaining what they all do.
(and some comments on the user-profile.cmd file) Inspired by the comments from cmderdev#193 and my personal need to use pageant instead of OpenSSH authentication agents (which is more Window user-friendly), I have used this approach which works as expected. Keeping the spirit of the current scripts, I left it disabled, and with some comments explaining what they all do.
For futur people the equivalent to linux's eval seems to be call so to call ssh-agent it would be |
I noticed that I had to start the Windows service "OpenSSH Authentication Agent". I think this advice may help some solution here to work, specially the solution from @bojanrajkovic . |
The latest version of |
For some reason either ssh-agent or ssh-pageant is working for me. It asks for password on startup, but then it asks again when I ssh to a server. |
I'm trying to setup Cmder to use ssh-agent forwarding:
λ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-JqBCMa6092/agent.6092; export SSH_AUTH_SOCK;
SSH_AGENT_PID=7840; export SSH_AGENT_PID;
echo Agent pid 7840;
λ ssh-add my-public-key.pub
Could not open a connection to your authentication agent
Any ideas what I'm doing wrong here?
Thank!
The text was updated successfully, but these errors were encountered: