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
115 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 ...
0
votes
0answers
10 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
2answers
1k 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 ...
1
vote
1answer
32 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
21 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
42 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 ...
5
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
12 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
35 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
38 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
110 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 ...
2
votes
1answer
27 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 ...
0
votes
2answers
1k 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
32 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 ...
74
votes
8answers
103k 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: ...
2
votes
0answers
4k 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
44 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 ...
83
votes
7answers
88k 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
83 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
36 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 ...
6
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
209 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 ...
1
vote
1answer
36 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
131 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 ...
0
votes
1answer
45 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
104 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
79 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
98 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
46 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
38 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?
38
votes
2answers
17k 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
266 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
133 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
60 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 '^#' ...
1
vote
2answers
178 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
48 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
6k 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
0answers
87 views

Start a ssh when I click on a JSP button

I have a JSP page, which has a button. I want to start a ssh to the linux server whenever someone clicks that button. Will I be able to see the terminal inside the browser? How can I do this?
0
votes
0answers
80 views

ssh agent-forwarding with lxc

I have a "little" problem I try to ssh using putty and pageant to server, than to ssh into lxc-container and than to other server. But no publickey is used, it prompts for password (at last hop). ...
5
votes
0answers
151 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
1answer
28 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 ...
2
votes
1answer
75 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 ...
2
votes
0answers
300 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
4k 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 ...
4
votes
2answers
702 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. ...
2
votes
1answer
103 views

Can ssh (agent) work with two separate identities? [duplicate]

I use an Ubuntu 14.10 distribution, and two private keys, one encrypted (~/.ssh/E.key), and one not encrypted (~/.ssh/NE.key), which I use for accessing two github repositories, respectively, repoE ...
3
votes
0answers
160 views

Why is my SSH authentication socket different from the man pages?

These two entries of man ssh-agent describe the SSH authentication socket: $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid> UNIX-domain sockets used to contain the connection to the authentication ...
4
votes
2answers
186 views

SSH password requested when in Tmux

When I connect to my remote machine I do authenticate using a rsa key (I think is rsa, don't remember). If I do ssh from a regular shell I get logged on the machine without a password. However if I ...