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
0answers
21 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 ...
3
votes
3answers
35 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
34 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 '^#' ...
2
votes
1answer
87 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 ...
1
vote
0answers
20 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 ...
0
votes
0answers
22 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
26 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). ...
3
votes
0answers
70 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
19 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
66 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 ...
1
vote
0answers
158 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 ...
1
vote
1answer
589 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 ...
0
votes
2answers
179 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 ...
3
votes
3answers
111 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. ...
1
vote
1answer
69 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
58 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
71 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 ...
0
votes
1answer
140 views

Is there a way to specify the list of private keys to add to ssh-agent?

After a few hours of digging, I finally found out why my computer stopped asking me for my key(s) using gnome ssh-askpass. It was very simple, but took me forever to figure out because... well... most ...
3
votes
1answer
54 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
638 views

How to save an SSH key passphrase in gnome-keyring?

I want to save an SSH key passphrase in gnome-keyring and then use it automatically when I need it. How to do this?
1
vote
1answer
130 views

Use git pull via ssh command invoke

When I log in to my server via SSH, I am able to use git over ssh (private repository): user@local:~$ ssh example.com Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 2.6.32-042stab083.2 i686) * ...
2
votes
2answers
133 views

Cron job not behaving as expected

So I have a python script that pulls down git/svn/p4 repositories and does some writing to a database. I'm simply trying to automate the running of this script and based from what I see in syslog it ...
1
vote
1answer
84 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 ...
4
votes
1answer
562 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
74 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 ...
1
vote
2answers
79 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
64 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
1answer
606 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
332 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? ...
14
votes
2answers
6k 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 ...
2
votes
1answer
180 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 ...
6
votes
2answers
269 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 ...
3
votes
3answers
354 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
947 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
238 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
499 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
146 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
231 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
1k 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 ...
3
votes
1answer
1k 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
5answers
3k 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
922 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
447 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, ...
3
votes
1answer
106 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 ...
43
votes
5answers
43k 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 ...
2
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
165 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
78 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
176 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 ...