Questions tagged [ssh-agent]

'ssh-agent' is a program that used together with OpenSSH or similar SSH programs provides a secure way of storing the private key. Man Page https://www.freebsd.org/cgi/man.cgi?query=ssh-agent&apropos=0&sektion=0&manpath=FreeBSD+13.1-RELEASE+and+Ports&arch=default&format=html

A password-based authentication process (in the common example of OpenSSH) may be vulnerable to brute-force attacks, if no mechanism is in place to detect them. To mitigate this lack of security, ssh supports public key authentication.

In order to log in securely to a remote system via a secure shell, a private key/public key pair is generated. The private key is stored on the local machine. The public key is stored on the target machine in the $HOME/.ssh/authorized_keys file. Public keys are not sensitive information and may be known to anybody, whereas the private key needs to be protected very carefully by a strong passphrase.

ssh-agent remembers the decrypted private key so that the user does not need to type it every time he or she wants to connect or send data to the server.

Source: Wikipedia (ssh-agent)

348 questions
11
votes
2 answers

How to pass an ssh key passphrase via environment variable

I run shell script with ssh command inside my application. Used private key is encrypted by passphrase and the problem is - I cannot interactively pass it when asked.Key is not added in ssh-agent. I cannot execute ssh-add my_key because the…
Sergei Voitovich
  • 2,804
  • 3
  • 25
  • 33
11
votes
3 answers

Cygwin ssh key added, but Git permission denied (publickey)

I have a problem when trying to use Git with Cygwin. I've generated and added ssh key to the GitLab server and everything works just fine through the MINGW64 (cloning, pulling, etc), but I wanted to use Cygwin and found that it doesn't work. Though…
mmelnik
  • 583
  • 5
  • 12
10
votes
5 answers

paramiko, isn't talking to ssh-agent. same behavior in fabric

Firstly I tried to get fabric working, but it kept asking me for a password. So I'm trying to reduce the problem. Perhaps it would be a good POC to just create a SSH connection from Python. I discovered that fabric uses parmiko for it's SSH…
Bryan Hunt
  • 3,685
  • 2
  • 24
  • 36
10
votes
5 answers

Jenkins plugin ssh-agent showing "ERROR: Failed to run ssh-add"

I getting error "ERROR: Failed to run ssh-add" I am trying to ssh into remote machine so SSH credential are set Pipeline script is calling ssh-agent On executing the job I get error below I have tried this reported bug…
Vivek Raj
  • 459
  • 5
  • 16
9
votes
4 answers

I need to re-run eval(ssh-agent) and ssh-add on every boot

I'm wondering if I could get some help. I recently reinstalled my OS and I'm running into a strange issue that I've never run into before. I'm following the Github steps to add ssh agent Basically, every time I log in I need to run eval "$(ssh-agent…
IanQ
  • 1,831
  • 5
  • 20
  • 29
9
votes
3 answers

How to deploy code from Github using deploy key in Docker?

I want to pull code from Github into my Docker image while building. I have a deploy key generated from the repository, but it seems to me the ssh-agent is not working on my Docker image. What I did (my Dockerfile): FROM python:2.7-stretch ADD…
Harsh M
  • 625
  • 2
  • 11
  • 25
9
votes
6 answers

Capistrano Deploy Failing on git:check - Permission denied (publickey)

Local OS: Windows 10 Pro (using Git Bash as my terminal) Staging Server OS: Ubuntu 16.04 LTS I've been struggling to get a basic Capistrano deploy working on my staging server. I followed this guide to set up Capistrano. The deployment process…
Alexander
  • 3,959
  • 2
  • 31
  • 58
9
votes
1 answer

mirroring a self-hosted git repository to github.com (auth failures)

I am trying to have my personal server be my primary git remote and automatically mirror that to github. I found this article which gets it mostly working with a post-receive script that does git push --mirror (essentially). My approach is different…
Peter Lyons
  • 142,938
  • 30
  • 279
  • 274
8
votes
3 answers

Jenkins pipeline - ssh to different machine and where to store credentials (using ssh/SSHAgent plugin/etc...)

TLDR: how to ssh a different machine and where to store ssh credentials on Jenkins pipeline (using ssh / SSHAgent plugin /etc...) ? The Problem: In Jenkins pipeline I need a remote ssh to target machine. My old approach was to use "Execute shell…
Riccardo79
  • 954
  • 4
  • 17
  • 35
8
votes
2 answers

Hudson Git Plugin not working on windows

I have msysgit installed with OpenSSH option. In Git bash, I can run ssh-agent, and it manages the passphrase for my ssh key. Is it possible for the Hudson Git plugin to use ssh-agent? Currently, it hangs when trying to clone, no doubt waiting for…
Jacko
  • 12,665
  • 18
  • 75
  • 126
8
votes
1 answer

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

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…
Daenyth
  • 35,856
  • 13
  • 85
  • 124
8
votes
4 answers

Eclipse git and ssh-agent

I use eclipse with git (egit). I would like to make use of my ssh-agent so I can push from eclipse. Does anybody know how to set up egit to use ssh-agent? background: I can't upload my key to eclipse as my keys are on a cryptostick. My ssh-agent…
Janning Vygen
  • 8,877
  • 9
  • 71
  • 102
8
votes
2 answers

putty pageant protocol?

ssh-agent has a protocol whereby data can be sent to it to get signed by a particular private key: http://api.libssh.org/rfc/PROTOCOL.agent In Linux, with ssh-agent, you'd open a Unix domain socket to SSH_AUTH_SOCK and send the packets to that. …
neubert
  • 15,947
  • 24
  • 120
  • 212
8
votes
1 answer

MySQL root-login with SSH private key?

Suppose Mysql -dbs and an admin with a bad habbit to forget the passwords (or paranoid enough wanting more creative authentication, not just password). Is it possible to access Mysql -root shell for example in a way that the Ssh-agent stores the…
hhh
  • 50,788
  • 62
  • 179
  • 282
7
votes
2 answers

Using an ssh agent from emacs in server mode

I am running emacs in server mode as a systemd user service and want to pull from a pubkey-authenticated remote repository using magit. Unfortunately, magit (or its git child process) cannot use my already loaded public key. Apparently, I cannot…
choeger
  • 3,562
  • 20
  • 33
1 2
3
23 24