ssh-agent

Using ssh-agent with jenkins while polling SCM

这一生的挚爱 提交于 2019-12-05 11:50:49
Im using the Jenkins ssh-agent plugin in order to give ssh credentials to my builds which works perfectly, however I have it set up to poll the scm (in this case bitbucket git) in order to check for changes. And of course to access the repo in order to poll for changes it also needs those ssh credentials, I cant seem to find anything related to this in the wiki but there must be a way to do so. It seems like such a silly thing for them to not have implemented it, after all if you need ssh credentials to clone and build you would also need them to poll right? Removing the passphrase from the

What mechanisms does ssh-agent use to keep unlocked private keys secure in memory?

 ̄綄美尐妖づ 提交于 2019-12-04 14:57:37
I'm working on a library to make quick access to KeepassX database files easier for power users. Right now the application is so short-lived in memory that security around the unencrypted KeePass database is not a huge concern. However, I'd like to add the ability to hold the database unlocked for a period of time in the background, similar to the way the KeepassX GUI does. This would allow immediate query of passwords without being prompted for the master password. This means there would be sort of daemon process that holds the database in memory and communicates with a client. It seems that

Github - can't connect via ssh from time to time

久未见 提交于 2019-12-04 10:16:05
Situation I'm using linux ( mint mate 17.2 ), when push to github via ssh, from time to time connection fails, usually it resume after reboot computer & network. After several days, it might become bad again, quite confusing. Push via http never has such issue, but it requires password which is not convenient. Debug info When push via ssh: debug1: Connecting to github.com [192.30.252.129] port 22. It stuck at the above line. Then after a long wait, get timeout tip: debug1: connect to address 192.30.252.129 port 22: Connection timed out ssh: connect to host github.com port 22: Connection timed

How to extract private keys from an ssh-agent?

家住魔仙堡 提交于 2019-12-03 23:37:11
ssh-add -l displays that I have 3 RSA keys added to my SSH agent. ssh-add -L displays those public keys. How do I get the private keys as well, so that I can save them to a file? Or is it by design that this is impossible? How does it work then? Can ssh-agent be asked to do operations using the private key? How can I ask it to encrypt/decrypt a number for me? It's OK that I have to write code for this (the programming language doesn't matter), but I'd prefer using an existing tool or a library. It's not possible to get the private key or to perform encryption using the protocol between ssh and

Unable to point to ssh keys in ~/.ssh on Jenkins host

∥☆過路亽.° 提交于 2019-12-03 12:29:41
I've installed SSH Agent Plugin to pull Git repository using SSH authentication. I'd like to use SSH keys located in system file (from the Jenkins master ~/.ssh option). It's screenshot taken from official plugin's page: Unfortunately I don't see this option. I can select only "Enter directly". Please check out my screenshot. Did I configure something wrong? This is a reletively recent change, explained in security advisory 440 : https://jenkins.io/security/advisory/2018-06-25/ SECURITY-440 / CVE-2018-1000601 SSH Credentials Plugin allowed the creation of SSH credentials with keys "From a file

Capistrano deployment from Windows using forward_agent option: “Error reading response length from authentication socket.”

徘徊边缘 提交于 2019-12-03 11:20:49
I'm trying to deploy a project using Capistrano. My development machine is running Windows 7; the server I'm deploying onto is Linux. In the deploy.rb script, the following is set: ssh_options[:forward_agent] = true The Capistrano script starts off by running a git command locally, at which point I'm prompted for the passphrase for my SSH key: * executing `deploy:update_code' executing locally: "git ls-remote git@github.com:pathto/gitproject.git develop" Enter passphrase for key '/c/Users/Sam/.ssh/id_rsa': command finished in 6999ms (I've removed the real git path from the above as you can

How is SSH_AUTH_SOCK setup and used by ssh-agent?

坚强是说给别人听的谎言 提交于 2019-12-03 09:53:53
I have been able to setup the sharing of ssh-agent for public-key authentication after reading https://superuser.com/a/230872/301446 The environment file thus generated has the following contents: SSH_AUTH_SOCK=/tmp/ssh-OwqeSuxmEsQN/agent.4744; export SSH_AUTH_SOCK; SSH_AGENT_PID=8960; export SSH_AGENT_PID; #echo Agent pid 8960; And agent.4744 has: !<socket >24194 s 07DF88C6-E9997283-4C471010-2FE57D77 Would you know how this socket is used by ssh-agent? I can understand that it's used by ssh-agent to share authentication information but exactly how? From here : $SSH_AUTH_SOCK contains the path

How can I get jenkins-cli.jar to use my ssh agent/keychain?

孤人 提交于 2019-12-03 07:17:12
I'm using the jenkins-cli.jar file from my jenkins server, and on every run it prompts me for my ssh key passphrase. I'd like it to use my ssh keychain so I don't have to enter it on every invocation. If it matters, I'm on OSX using the default keychain setup, I don't have a manual ssh-agent configured right now. Jenkins CLI client does not support SSH agents for now. As a workaround, you can generate dedicated key without passphrase, associate it with your Jenkins account and instruct client to use that key on every invocation. 来源: https://stackoverflow.com/questions/30806578/how-can-i-get

Ansible SSH forwarding doesn't seem to work with Vagrant

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 16:41:58
OK, strange question. I have SSH forwarding working with Vagrant. But I'm trying to get it working when using Ansible as a Vagrant provisioner. I found out exactly what Ansible is executing, and tried it myself from the command line, sure enough, it fails there too. [/common/picsolve-ansible/u12.04%]ssh -o HostName=127.0.0.1 \ -o User=vagrant -o Port=2222 -o UserKnownHostsFile=/dev/null \ -o StrictHostKeyChecking=no -o PasswordAuthentication=no \ -o IdentityFile=/Users/bryanhunt/.vagrant.d/insecure_private_key \ -o IdentitiesOnly=yes -o LogLevel=FATAL \ -o ForwardAgent=yes "/bin/sh \ -c 'git

Remember git passphrase in WSL

允我心安 提交于 2019-12-02 06:03:42
问题 I run Windows 10 with WSL. I have the desired behaviour on one computer, but cannot replicate elsewhere. Here's what I'm after: First time I run a remote git command using my ssh key, git prompts me for the passphrase Subsequent times no prompt, including in new terminal windows (I use ConEmu) When all console windows are closed, back to #1 Things I've tried: using eval $(ssh-agent) , followed by ssh-add ; it will remember the passphrase, but if I put it in my ~/.bash_profile then it prompts