ssh-agent is a single sign-on mechanism for SSH that is included in the OpenSSH software. Use this tag for questions on how to configure and use ssh-agent.

learn more… | top users | synonyms

2
votes
1answer
50 views

constant “enter passphrase for public key” by ssh

What could be the reason that ssh < host > is asking for public key password Enter passphrase for key '/home/%d/.ssh/id_rsa.pub': even if provided a good password? I have no problem with ...
3
votes
2answers
2k views

SSH Agent Forwarding on server

I'm struggling with the concept of SSH Agent Forwarding. This is what I've done so far: Create default identity local (ssh-keygen) Install the public key on bitbucket Now I want to connect to a ...
80
votes
8answers
117k views

ssh-add complains: Could not open a connection to your authentication agent

I've been trying to get ssh-add working on a RaspberryPi running Raspbian. I can start ssh-agent, when I do it gives the following output into the terminal: SSH_AUTH_SOCK=/tmp/ssh-06TcpPflMg58/...
2
votes
2answers
151 views

How can I run ssh-add on demand? Can it act as SSH_ASKPASS?

I want to ssh from user@local to user@remote several times per day with an encrypted SSH key, a situation which ssh-agent handles with a good trade-off between security and usability. I'd also like ...
102
votes
8answers
113k views

How can I run ssh-add automatically, without password prompt?

I want to communicate between several computers on my network (static ethernet), through ssh. In order to do that I need to run ssh-add every time I login on specific machine, how can I do it so that ...
1
vote
1answer
60 views

ssh-agent: How to keep the login key, and add more identities?

When I log in to my local Ubuntu 14 instance from Windows (I use SecureCRT as a SSH client) using my RSA key, the key is available for forwarding for further SSH sessions (it is listed with ssh-add -l)...
2
votes
2answers
54 views

Add keys to ssh-agent

I have three SSH key pairs that I want to have added to the SSH agent every time I start a shell. After restarting I always have to manually add them again by using ssh-add <path_to_private_key>....
3
votes
4answers
1k views

Must I store a private key in a file?

I have a db-driven application that needs to communicate with another server via ssh. The web app can generate a keypair and give the user the pubkey, or it can accept the unencrypted private key in a ...
0
votes
0answers
56 views

Ansible: running from virtualenvwrapper with pip installation

I'm trying to test ansible with a "pip" installation of ansible in a virtualenv of python managed by virtualenvwrapper. However, I am having problems to use the ssh-agent and the SSH keys: (ansible)$ ...
8
votes
1answer
201 views

Is there a technical reason why ssh-agent lacks a sudo-like inactivity/idle timeout feature?

There are some brief discussions about the existing ssh-agent -t feature at [1], and there was a post as far back as 2001 on debian-devel [2] wishing for an inactivity timeout feature. There's a ...
0
votes
0answers
11 views

Can I make entering my private key's password work like sudo does? [duplicate]

Is there a way to skip typing my SSH private key's password if I have used it recently, similar to when sudo caches your credentials for a limited time? I know that I can use ssh-add with the -t ...
2
votes
1answer
38 views

How to clear SSH keys from script run as root?

I want to configure my laptop to clear all my SSH keys from the authentication agent when I close the lid of my laptop. Clearing the keys can be done by running ssh-add -D. Running a script when ...
-1
votes
1answer
30 views

find one difference…(or more) [closed]

I have two servers (debian). Almost identical. I want to use SSH AgentForwarding. I try to login from A to B and from B to A: On user@A: set | grep SSH SSH_AUTH_SOCK=/tmp/ssh-uEsiAIsssn/agent.1234 ...
0
votes
1answer
205 views

Unable to establish an SSH tunnel using Redis Desktop Manager

I am trying to connect to an Elasticache Redis Server via an AWS Ubuntu instance and using an ssh tunnel. When I try to configure Redis Desktop Manager to connect via an ssh tunnel and provide ...
6
votes
1answer
1k views

How do I stop ssh-agent trying all keys with agent forwarding?

Often I'll connect via SSH to VM instances to deploy code from private Bitbucket repositories, cloning repositories via git over SSH. Today I was getting the error: conq: repository access denied. ...
1
vote
1answer
17 views

xautolock/ssh-add can't interact with ssh-agent if launched from .xsessionrc

I use xautolock to lock the screen and suspend my laptop after a given amount of time of inactivity. This works fine. This is how xautolock is started from .xsessionrc: xautolock -time 60 -...
1
vote
1answer
315 views

ssh algorithm negotiation failed

Problem Ok, the problem is that I am using Pycharm on El Capitan. I am trying to connect to a server that has strict login Kexalgorithms using the newer Key Exchange Algorithms than Pycharm seems to ...
0
votes
1answer
60 views

How can I avoid always having to use `eval 'ssh-agent -s'`

I can't figure out why everytime I ssh back into my server I always have to start my ssh agent with the command eval 'ssh-agent -s' followed by ssh-add <my_key.pem> in order to successfully ssh ...
1
vote
2answers
345 views

Why can't I authenticate to GitHub?

my_username@my_username-laptop MINGW64 ~ (master) $ ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/c/Users/my_username/.ssh/id_dsa):Enter Enter ...
0
votes
0answers
19 views

Trying to make a SSH Tunel [duplicate]

I configurated a bastion server on AWS on my public subnet. I can make direct ssh to the ec2 instance inside the private subnet, using the bastion host. I can connect to the bastion host and check ...
1
vote
1answer
62 views

Could not open a connection to your authentication agent

I am using a mac. and I am trying to add the key to the agent. Vinays-MacBook-Pro:XSLT vinay$ eval $(ssh-agent) Agent pid 49170 Vinays-MacBook-Pro:XSLT vinay$ ssh-agent SSH_AUTH_SOCK=/var/folders/...
0
votes
2answers
3k views

Using lftp with ssh-agent

I have a script that logs into sftp server eval `ssh-agent -s` ssh-add /home/<username>/.ssh/id_rsa sftp <username>@<target> This works, but I would like to get only files that ...
4
votes
1answer
77 views

Detecting the remaining lifetime of an ssh-agent identity

The ssh-add command lets you specify the lifetime of an identity being added to ssh-agent. For example, if I type ssh-add -t 1h the identify will expire after 1 hour. I can then list the identities ...
2
votes
0answers
6k views

ssh-agent not getting set up (SSH_AUTH_SOCK, SSH_AGENT_PID env vars not set)

I set up a new user account for a friend on Kubuntu 12.04. When he uses ssh he gets this error: Could not open a connection to your authentication agent We're running ssh in some bash scripts. ...
1
vote
1answer
65 views

Why does git store my SSH identity in gnome, but not KDE?

I'm used to git only prompting me for my SSH passphrase the first time I need to authenticate to a server. On the system I'm currently on, this only works in a Gnome session. If I start a KDE session,...
1
vote
1answer
171 views

How to force ssh-add to ask passphrase when loading RSA key from FIFO?

I've created the following RSA key (with passphrase): ssh-keygen -t rsa -f rsa_foo Now when adding the key in normal way, ssh-add asks for the passphrase fine: $ ssh-add rsa_foo Enter passphrase ...
1
vote
1answer
67 views

SSH Agent admitted failure to sign using the keys

I have upgraded my debian from wheezy to jessie. A ssh-agent is started when I launch my wm (awesome launch via gdm3), I can do ssh-add The env vars about ssh are correctly set. ps aux |grep ssh-...
7
votes
1answer
3k views

SSH agent forwarding, multiple hop

I tested this setup with Linux origin machine - everything is the same - only the first hop can use keys from origin machine. Initial problem I'm trying to set up SSH agent forwarding with multiple ...
0
votes
0answers
456 views

How to restart ssh server / sshd on Linux?

I am trying to restart the ssh server on my server which is running Fedora Cloud. I have tried the method here http://www.cyberciti.biz/faq/howto-restart-ssh/ (# service sshd restart) and get Failed ...
0
votes
1answer
42 views

configuring ssh-agent

I'm using ssh-agent for caching private keys; it's working well before connecting remote PC its not asking for a PASSPHRASE but its asking remote user password. Ex: host$ sudo ssh-agent bash ...
5
votes
2answers
228 views

Deleted my ssh keys

I'm on a Mac (OSX). I've accidentally deleted my ssh keys, but I haven't restarted my computer yet so I'm still able to access servers with my key. I guess the ssh-agent has some form of it in memory?...
0
votes
1answer
53 views

Error becoming root centos

I'm getting the following error when I'm trying to become root -bash-4.1$ sudo su - Could not open a connection to your authentication agent. * Error: Problem adding; giving up I have tried eval "$(...
0
votes
1answer
151 views

SSH client not trying my keys in ssh-agent

I'm on OS X Yosemite 10.10.5, and my SSH client is behaving in a way I can't explain or resolve. My goal is simply to connect to a server with: ssh -A core@12.34.56.78 When I add -v to this, I can ...
2
votes
2answers
108 views

Git config forwarding

I don't know if this even possible or not. I was wondering if there is any way like SSH Agent forwarding by which we can forward our .gitconfig on the remote server, and git automatically picks the ...
1
vote
1answer
2k views

Double port forwarding - SSH

NOTE: I'm not explaining why I want to do this. But here is the requirement. There are 4 hosts. Host A, Host B, Host C, Host D Host A is running some application which can be accessed at port 8001 ...
3
votes
2answers
120 views

monkeysphere to gnupg 2.1 workflow change

So, like many people, I was using my GPG key for SSH authentication with the help of monkeysphere, so I could load my private key to agent with monkeysphere s command and be free to connect anywhere I ...
1
vote
1answer
63 views

ssh-agent and timeout

I am using a script to update my system: cd /opt/ chmod 600 /opt/updater/.ssh/.pk ssh-agent bash -c 'ssh-add /opt/updater/.ssh/.pk; git stash; git pull origin master' /opt/updater/bin/updater.sh My ...
2
votes
1answer
39 views

How can I have ssh-agent warn if using a particular key?

I have an older SSH key that I'm replacing, and I would like ssh-agent to warn me if it used the older key, so I know to update it on that server. Is there a way to do this?
48
votes
2answers
23k views

ssh-add is not persistent between reboots

I add a ssh key to the agent by $ ssh-add ~/.ssh/id_rsa_mac Identity added: /Users/alex/.ssh/id_rsa_mac (/Users/alex/.ssh/id_rsa_mac) After reboot I don't have this key added anymore: $ ssh-add -l ...
3
votes
3answers
349 views

ssh-add is forgotten if new gnome-terminal is opened

After a: eval `ssh-agent -s` ssh-add I can log in to a "server" via ssh without pwd. Question: But If I open a new gnome-terminal I have to do this again, why? Using RHEL Desktop 6.6 with ...
2
votes
1answer
151 views

Best way to connect to an existing user context through SSH

What we would like to do: We have short living virtual machines for running scripts. The virtual machines are used through SSH to perform "builds" (sequence of scripts) and discarded once all the ...
2
votes
1answer
74 views

Identify SSH public key on remote end's shell session (no agent or no identities in agent)

I know this way to find out which key was used to authenticate when using keys stored in a key agent: ssh-add -L 2>/dev/null | awk '{print $1}' | while read identity; do grep -v '^#' ~/.ssh/...
1
vote
2answers
275 views

How to use private-key to setup password-less ssh on new machine

I have one machine say source1 and there is passwordless ssh already set to more than 100 server say remote1, remote2, ...remote100. Now I need to set similar setup of passwordless ssh on another ...
2
votes
0answers
56 views

Run ssh-agent 24/7 using keychain?

I have a Node.js script that requires ssh-agent to be running 24/7 on my Ubuntu server. I installed keychain and put eval 'keychain --eval id_rsa into my ~/.bash_profile, but that only runs when I ssh ...
8
votes
5answers
8k views

Is there a way to check a users SSH key to see if the passphrase is blank [duplicate]

I'm looking to lock down our Solaris 10, RHEL 5, and SLES 11.2 servers. It has come to my attention that some of the users have no passphrase for their SSH keys. Is there a way I can check for this ...
0
votes
1answer
32 views

Set MasSessions to SSH does not take effect

I got a server with enabled ssh. To prevent attacks and to fit to my needs, I just need one connection at the same time to my server. So, I tried to set MaxSessions paramater to 1 in /etc/ssh/...
2
votes
1answer
76 views

Solution for private keys on a remote machine?

I have to manage several servers, with services that can be cron, and integration jobs, deployments, backups. The common thing with all of these, is that they sometimes require access to other servers....
3
votes
0answers
365 views

How do I combine SSH agent forwarding and gpg-agent?

I have an ssh-agent running on my local machine. I connect to a remote machine via SSH, with agent forwarding enabled. On that remote there is an instance of gpg-agent running. I know that recent ...
3
votes
1answer
6k views

“Permanently added the RSA host key” what does it mean?

I'm very new to Unix and things around it, particularly for this question is SSH and authentication. I know that I can create identities (create a pair of public/private key), put it into ssh-agent ...
6
votes
2answers
1k views

How to get asked for SSH key passphrase once and only when needed?

(I have read many of the questions on this site that look related and I believe this is a genuinely new question.) I have lots of keys on lots of servers and they're all protected with passphrases. ...