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

1
vote
1answer
32 views

Keychain SSH Key Manager prevents SFTP login on CentOS

I installed keychain and added this to my .bashrc in CentOs to help manage my SSH Keys: /usr/bin/keychain --clear $HOME/.ssh/id_rsa source $HOME/.keychain/$HOSTNAME-sh So on SSH login I am prompted ...
3
votes
1answer
83 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
32 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
1answer
37 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 ...
1
vote
1answer
47 views

Accidentally garbled a bunch of file names in /tmp… ssh keys asking for passwords

I accidentally garbled the file names of the contents of my /tmp directory (don't ask) to the point where they're not recoverable. Since doing so, I'm always asked for the password to my ssh keys ...
1
vote
0answers
90 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 ...
5
votes
2answers
176 views

Why ssh-agent group ownership is not root

Trying to understand why ssh-agent has sgid bit and found this post ssh-agent has sgid I have another question, why the group ownership of ssh-agent is nobody not root? What is the reason behind it? ...
5
votes
2answers
970 views

ssh-add in 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 ...
2
votes
1answer
105 views

Why do I need to insert the passphrase for an RSA key on a remote host after SSH?

From host B I can SSH various other hosts (C, D) without using any password as I put the public key in the correspondent authorized_keys files (in hosts C and D). From host A I can SSH host B (via ...
3
votes
2answers
101 views

Have ssh-add be quiet if key already there

I want to put ssh-add /path/to/special_key at the top of a script. This works fine, but it always prompts for the passphrase. This is strange, and a little annoying, as it still asks for the ...
2
votes
3answers
104 views

How do I get ssh-agent to work in all terminals?

I have set up automatic (password less) ssh login to some servers using ssh-copy-id. ssh-agent works only from the terminal where it was run. How do I get ssh-add to work in all my terminals? ...
0
votes
3answers
314 views

SSH Agent-Forwarding works, but what about sudo -u username no shell/ permissions? composer

Working on a remote server (A) I want to use my local SSH-Keys to access a repository on another server (B) that is not controlled by me. Generally this works like a charm. I log in as myUsername ...
1
vote
0answers
127 views

ssh-agent on CentOS 6.5 keeps “disabling” itself

I recently installed git on my CentOS 6.5 system. During the process I setup a key/pair for GitHub so I don't have to enter a password for every git process. I did this by adding the rsa file to ...
1
vote
2answers
178 views

ssh-agent not adding key when started graphically

Recently I added the following script to my auto-start (in KDE): eval `ssh-agent` ssh-add The script should be started at login and ask for my passphrase and load my secret key. It does almost ...
1
vote
2answers
98 views

using ssh-agent

I have my desktop in the office. When X starts, ssh-agent starts automatically. I have to add my SSH key once, at the beginning, and then I can use ssh without having to enter my password each time. ...
3
votes
1answer
106 views

Too many keys being added to ssh-agent in CentOS6 - how can I stop this?

I was trying to debug an ssh problem Too many authentication failures, and find with ssh -vv that ssh is presenting lots of keys before falling back to try a password. On investigation I find that ...
2
votes
3answers
363 views

Configuring the default timeout for the SSH agent

I use ssh-add to add my SSH keys to the SSH agent. By default, it adds them indefinitely. There's a command-line option to specify a timeout, but is there a configuration file option which will ...
2
votes
1answer
751 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 ...
7
votes
4answers
1k views

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

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 ...
-1
votes
1answer
176 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 ...
1
vote
1answer
217 views

How would I detect a non-login shell? (In Zsh)

I want to create a script that runs when a Zsh instance starts, but only if the instance is: Non-login. Interactive I think I'm right to say .zshrc runs for all interactive shell instances, ...
2
votes
1answer
82 views

Translate GNU ps flags to standard flags

I'm using oh-my-zsh and its ssh-agent plugin on OSX, but lately somebody upstream decided to use ps x. I'm not entirely sure what that even does, since I haven't used a GNU userland in something close ...
0
votes
0answers
146 views

ssh-agent defunct from the start

140 root 4029 3997 0 09:01 ? 00:00:00 \_ /usr/sbin/gdm-binary -nodaemon 141 root 4034 4029 1 09:01 tty7 00:00:01 \_ /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth ...
17
votes
3answers
15k 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 ...
0
votes
0answers
2k 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. ...
2
votes
1answer
107 views

Executing 'ssh-add -D' from a cron job doesn't work

I've set up an openSSH server on an ubuntu-server machine, and I configured it to use public/private key (without password). I want to require both password and key check when the client connects to ...
0
votes
1answer
69 views

SSH from osx to osx and then use agent

I have a mac at home and a mac at work. The work mac is setup for ssh to all work related servers. Sometimes I have to connect from my home mac and access the servers which are setup on my work mac. ...
1
vote
1answer
1k views

ssh-agent: How to set it up so my CentOS server will only ask for passphrase once?

On my Macbook, my SSH private key is encrypted, but I never have to re-enter the passphrase even if I reboot the machine. The system must be unlocking it along with my user account. Is it possible ...
1
vote
0answers
122 views

Reverse ssh-agent forwarding and unlocking remote keys with your local keys

So the following two things should both be possible to do with ssh the question is just how difficult they would be and I'm hoping someone can give me an easy answer. 1) Suppose I have several ...
3
votes
2answers
1k views

SSH Agent does not work with pkcs8 private key

I did encrypt my private key using openssl pkcs8 -topk8 -in id_rsa -out id_rsa_new -v2 des3 (http://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html) But now, ssh-agent ...
1
vote
1answer
165 views

How to prevent ssh-agent from starting in CentOS?

How do I stop ssh-agent from starting when logging into CentOS via openssh? There are no references to ssh-agent in my bash startup scripts (.bashrc) or /etc/bashrc.
2
votes
3answers
226 views

Is there a way to maintain ssh-agent connectivity in different screens?

Whenever I use ssh-agent for passwordless logins it doesn't work across different logins and screen sessions, even if they are concurrent. I suspect it uses some shell variables that don't work ...
2
votes
2answers
196 views

Automatically unlock keys on a remote host accessed via SSH

On my local PC my ssh keys are automatically unlocked on login. From there I access via ssh (with key authentication) a server that have stored the same keys I have in the client. I'd like to unlock ...
3
votes
1answer
295 views

How can I silence ssh-agent?

I have a script like this one at my .bashrc file at the mysuer home: eval `ssh-agent` ssh-add /path/to/my/key The problem is I have this output when I log with the user mysuer (su - myuser): Agent ...
6
votes
2answers
470 views

ssh-agent: don't forward authentication for the whole keyring

I have two private ssh keys : one to access my personnal machines, one to access servers at my job. I add those two keys to my ssh-agent with ssh-add. Now, when I do ssh -A root@jobsrv I ...
3
votes
3answers
419 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 ...
1
vote
1answer
404 views

The keys work from config but not from ssh-add

Ssh keys work fine, if indicated in ./ssh/config but if i try $ssh-add mykey Could not open a connection to your authentication agent even with ssh-add -l give the same result
5
votes
3answers
823 views

Remote shell script Enter passphrase for

How can I run a script to log into a remote server and execute a remote ssh command without entering in my passphrase? For example: When I log onto a remote server and execute the git pull command I ...
12
votes
1answer
8k views

How to list keys added to ssh-agent with ssh-add?

How and where can I check what keys have been added with ssh-add to my ssh-agent ?
4
votes
2answers
2k views

How is ssh-agent being autostarted?

I am currently running Crunchbang Linux with Openbox, and as soon as I log in I have an ssh-agent process running and I can't for the life of me figure why it is being autostarted. Here is the ...
1
vote
1answer
235 views

Can SSH-Agent work from a remote bash script?

Server A needs to connect over svn+ssh to Server B to grab some source files for deploying on Server A. My deployment script runs from my local dev machine via: ssh serverA 'bash -s' < deploy.sh ...
2
votes
2answers
959 views

SSH public key login: two different keys and SSH_AUTH_SOCK behaviour

A user (user1) on an Ubuntu 12.04 desktop has two SSH RSA keys configured: ~/.ssh/id_rsa and ~/.ssh/id_rsa1 (and .pub files). Both public keys are configured in the authorised keys on the server's ...
13
votes
4answers
6k views

How can I solve this ssh-agent problem?

I'm using Linux Mint, and have not been able to get gnome-keyring to unlock automatically at login, it seems. A symptom of my problem is as follows: $ ssh-add Identity added: /home/me/.ssh/id_rsa ...
6
votes
1answer
2k views

How to use ssh-agent with multiple (valid) keys and yet choose which one to use?

Let's say there are two keys A and B, both of which are valid for user@host public key authentication. Since authorized_keys is configured for different behaviour depending on the key, ~/.ssh/config ...
2
votes
2answers
264 views

ssh-add on an intermediate ssh hop node

I am on machine A, hopping onto machine B to finally reach machine C. A --ssh--> B --ssh--> C When I ssh-add my private key on A, all works fine and I can hop onto B as many times as I want ...
37
votes
3answers
44k 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
2answers
186 views

is it possible to trigger `ssh-add <key>` only when I ssh into a box? (from Cygwin)

I've got my .bash_profile set up to eval $(ssh-agent) so I can quickly connect to servers. If I add ssh-add ~/.ssh/id_rsa_my_key to my .bash_profile as well, I'll have to type the ssh key passphrase ...
1
vote
1answer
717 views

ssh-agent not starting in OpenSuSE desktop

It seems that ssh-agent is not starting on my OpenSuSE system. When I run pgrep -fl ssh-agent, the result is blank. On my Linux Mint laptop, I get 1785 /usr/bin/ssh-agent /usr/bin/dbus-launch ...
3
votes
1answer
1k views

tmux on startup and ssh-agent forwarding issue

I've added the following lines (taken from here) to my .bashrc to automatically start a tmux session on login: if [ "$PS1" != "" -a "${STARTED_TMUX:-x}" = x -a "${SSH_TTY:-x}" != x ] then ...
3
votes
1answer
186 views

How are loaded SSH keys referenced by name?

I'm using chef's knife ec2 tool which requires the name of a loaded SSH key (that was created in the Amazon EC2 control panel) It seems strange to me that it uses a name to reference the keypair - ...