Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ssh-agent]

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.

240
votes
15answers
299k views

How can I run ssh-add automatically, without a 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 log in on a specific machine, how can I do it so ...
58
votes
2answers
230k views

How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0?

I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1 key exchange method: ssh 123.123.123.123 Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method ...
20
votes
1answer
15k 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 ...
147
votes
3answers
86k views

ssh-add is not persistent between reboots

I added 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 a reboot the agent doesn't have this key added anymore: ...
12
votes
2answers
5k views

How to start and use ssh-agent as systemd service?

How to start ssh-agent as systemd service? There are some suggestions in the net, but they are not complete. How to add automatically unencrypted keys if ssh-agent service was started successfully? ...
10
votes
3answers
10k 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 ...
0
votes
0answers
169 views

Agent forwarding and `sudo` vs `sudo -i`

Under an ssh -X -A localhost session, sudo xeyes opens the eyes but sudo -i xeyes does not. ~$ sudo -i xeyes X11 connection rejected because of wrong authentication. What extra step is needed in ...
151
votes
8answers
257k 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/...
23
votes
3answers
13k 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? ...
8
votes
1answer
2k views

Save SSH key passphrase using keychain with --noask option

I want to use keychain to manage passphrase prompt for SSH keys, but it should 1) ask it only when I'm actually using key and 2) save it for some period of time after that. Currently I've 2 options: $...
9
votes
1answer
461 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 ...
3
votes
2answers
16k views

sign_and_send_pubkey: signing failed: agent refused operation

Running xubuntu 16.04, with xfce, I'm trying to use ssh keys with passphrases. I would like to add my passphrased key to my ssh-agent, but I don't know why I can't add it. I don't have gnome keyring ...
6
votes
2answers
19k 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?
3
votes
2answers
1k 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>....
2
votes
3answers
4k 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 ...
6
votes
5answers
2k views

Avoid separately adding ssh keys (with password) to shell sessions

Note: Adding a few lines to the .<name of shell>rc will not solve the problem here, since this particular ssh key has a password and that would not eliminate the need to keep typing it. So I ...
3
votes
1answer
8k 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 pkcs11 ...
3
votes
1answer
532 views

How to use ssh-agent for offering host specific keys from ~/.ssh/config file and manage the passphrases?

I configured different hosts and keys for them in ~/.ssh/config file. But, to manage the passphrases of different keys, I seek help from ssh-agent by adding the keys to it, via ssh-add command. Now ...
2
votes
2answers
609 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 ...
2
votes
2answers
635 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 ...
1
vote
1answer
5k 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 I ...
1
vote
1answer
93 views

Sudo-like utility for ssh, or at least git in particular?

I'd like to keep my keys secure, but also not have to enter a passphrase on every single git invocation, when I want to run several commands in quick succession. I've researched this, and found that ...
0
votes
0answers
49 views

Agent forwarding and `sudo` vs `sudo -i` [duplicate]

Under an ssh -X -A localhost session, sudo xeyes opens the eyes but sudo -i xeyes does not. ~$ sudo -i xeyes X11 connection rejected because of wrong authentication. What extra step is needed in ...
0
votes
2answers
1k 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 ...