The tag has no wiki summary.

learn more… | top users | synonyms

31
votes
3answers
30k 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: ...
12
votes
4answers
5k 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 ...
7
votes
4answers
609 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 ...
6
votes
1answer
3k 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 ?
6
votes
1answer
881 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 ...
6
votes
2answers
280 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 ...
5
votes
3answers
492 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 ...
5
votes
3answers
3k 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 ...
4
votes
1answer
532 views

Ssh keeps asking for passphrase several times

I have a remote machine, with which I have set up public-key ssh auth - that is, I can ssh to it without typing in password each time. And I have a set of actions in a script, which use that ssh ...
4
votes
2answers
1k 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 ...
3
votes
1answer
37 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 ...
3
votes
3answers
276 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 ...
3
votes
1answer
176 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 - ...
3
votes
1answer
177 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 ...
3
votes
2answers
925 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 ...
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 ...
2
votes
2answers
209 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 ...
2
votes
3answers
115 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
1answer
398 views

Can I set how long ssh-agent keeps keys in memory?

I'd like to have my keyfiles leave memory after a certain amount of disuse. Is there a way to make ssh-agent expire keys faster? It feels like it keeps them in memory and not needing a passphrase for ...
2
votes
2answers
148 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 ...
2
votes
2answers
804 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 ...
2
votes
2answers
38 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. ...
2
votes
3answers
49 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
88 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 ...
2
votes
1answer
69 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 ...
2
votes
2answers
165 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 ...
2
votes
1answer
92 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 ...
1
vote
1answer
72 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, ...
1
vote
1answer
181 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 ...
1
vote
1answer
285 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
1
vote
1answer
611 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 ...
1
vote
1answer
472 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
87 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 ...
1
vote
1answer
107 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.
0
votes
1answer
57 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. ...
0
votes
0answers
86 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 ...
0
votes
0answers
731 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
votes
1answer
64 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 ...