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
0
votes
1 answer

jenkins ssh agent fail to copy war to remote server

I am new to jenkin, I have created a jenkinFile to build a war and copy it to a remote machine on tomcat server based on the following…
user1999453
  • 1,297
  • 4
  • 29
  • 65
0
votes
1 answer

SSH Agent forward to docker container in docker-compose file

I am using SSH agent forwarding to connect to my hosting and the application is dockerized. I now want to forward the agent on to docker, so from local -> server -> docker. Agent forwarding from local to serve is working, what should be done for the…
xelber
  • 4,197
  • 3
  • 25
  • 33
0
votes
1 answer

Capture output from ssh-add launched by another command

Here's the full version of my question. I'm including all this detail in case my hunch is wrong, but you may want to skip to the tl;dr below. I'm trying to write a function that runs an arbitrary command and also captures whether any output was…
mike
  • 4,901
  • 2
  • 19
  • 19
0
votes
1 answer

How to permanently add SSH key for lcoal git (github) repository?

I'm using SSH key to secure push/fetch data from my github repository. But now I start ssh-agent and add ssh key every terminal start. It's annoying. In new terminal I get git@github.com: Permission denied (publickey). error trying to push/fetch…
mooko
  • 109
  • 1
  • 4
0
votes
0 answers

Using ssh credentials in post-build of Jenkins matrix job

We have a Jenkins matrix job with "SSH Agent" enabled in "Build Environment" with SSH credentials and a post-build action of "Execute Scripts On Matrix" with a shell command that runs ssh expecting to use the credentials stored by ssh-agent. We…
Mike Crowe
  • 642
  • 6
  • 18
0
votes
1 answer

jenkins how to use ssh-agent in docker

My jenkins is run in docker, I write a demo to remote my server with ssh-agent. Here is my pipeline pipeline { agent any stages { stage('Hello') { steps { sshagent (credentials: ['hehu']) { …
user1434702
  • 817
  • 1
  • 14
  • 33
0
votes
1 answer

Jenkins add new node via ssh

I am successfully able to connect to the agent client server via ssh agent. The issue I am having is after deleting the agent and adding it again as a new agent. What all so far I have tried on client- 1) restarted sshd 2) removed content from…
0
votes
1 answer

Start ssh-agent on headless docker host

On my desktop machine I've developed a docker container which clones some Git repository. To provide the credentials I mount my local ssh-agent as it is specified in $SSH_AUTH_SOCK into the docker container. Now I want to deploy this docker image on…
white_gecko
  • 4,808
  • 4
  • 55
  • 76
0
votes
1 answer

Generating SSH key in git bash, i can't get git agent

When I am trying to generate SSH key in git bash, I can't get git agent when we run this command eval $(ssh-agent -s) then I will get this error unix_listener: cannot listen on path /tmp/ssh-xoEnzGUu8XxU/agent.1287: Permission denied How can I…
0
votes
1 answer

why can't push in a second cloned repository?

i have a repository on bitbucket and i cloned it to my laptop as "Repo1" and there it is where i commit and push. From an instance of DigitalOcean i make pull requests. But, i cloned again the repository from bitbucket to my laptop as "Repo2" and i…
German
  • 192
  • 1
  • 11
0
votes
1 answer

invalid key format for git access ssh-add on ubuntu 19.10

I am trying to configure git with ssh access so on my ubuntu virtual machine I generated a key pair. as per instructions here https://linuxtechlab.com/how-to-install-github-on-ubuntu-step-by-step/ $ ssh-keygen -t rsa -C…
koeradoera
  • 507
  • 1
  • 4
  • 9
0
votes
0 answers

How to write a shell script to pass ssh-add private-key's passphrase?

I am writing an appliation that will run a shell scripts behind the scene. The command that I run in the script looks like this, cd ~/.ssh/ && ssh-add -D && ssh-add It is trying to add a private key to the ssh agent. When this…
user673508
  • 1
  • 1
  • 1
0
votes
1 answer

Jenkins ssh agent plugin is getting stacked, No error, no timeout issue

I installed jenkins ssh agent plugin. I created ssh private key on the linux server(using ssh-keygen -t rsa command) I am trying to connect. Then under jenkins credintials added SSH Username with private key with all required fields. In jenkinsfile…
gogagubi
  • 965
  • 1
  • 15
  • 36
0
votes
3 answers

jenkins tomcat ssh permission denied

Trying to use the Jenkins ssh agent plugin in pipeline to copy war file to tomcat ( both running on Ubuntu 18.04 on Ec2). Using standard sample code and using key based authentication. Tomcat is up and running. stage('Deploy to Tomcat'){ …
Sam-T
  • 1,877
  • 6
  • 23
  • 51
0
votes
0 answers

How to forward .gitlab-ci ssh-add command in gitlab pipeline?

The before_scriptin my .gitlab-ci.yml file stops while waiting for a password phrase. I already added the private ssh key as an environment variable I added the public key on the server I do not need a passphrase when connecting to the server via…
thiloilg
  • 1,733
  • 2
  • 18
  • 23