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.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

How to launch the password in pssh command

when we want to use pssh in order to get in parallel the command output from remote machine we can do ( for example ) pssh -H presto01 -l root -A -i "hostname" Warning: do not enter your password if ...
0
votes
2answers
959 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 ...
3
votes
1answer
34 views

Why does SSH_AUTH_SOCK and SSH_AGENT_PID unsets after a while in Amazon Linux?

We have a build system that needs an active ssh connection with mercurial and to do so, it needs an ssh-agent loaded with a key constantly.. The thing is that, even though that after creating the ssh ...
2
votes
1answer
32 views

SSH keys can't be deleted from agent

My Ubuntu 18.04 keeps adding all my SSH keys into the ssh agent upon startup and I am unable to delete them. Having so many keys in the agent breaks authentication to servers that only permit 3 or 5 ...
12
votes
2answers
6k 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? ...
240
votes
15answers
303k 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 ...
0
votes
0answers
17 views

Run a section of AWS userdata as ec2-user

I am trying to pull some git repos in my EC2 userdata, but want to pull them as ec2-user rather than root. As I dont want the private key on the disk I am using ssh-agent to load a key from Parameter ...
0
votes
1answer
32 views

ssh-add -l does not show the location of the SSH key(s)

When I run ssh-add -l, it does not show the location of the SSH key(s). It outputs the following: 4096 SHA256:bBMtB9wL6RXRWhvx5M+LDox6A2gq61CDtZN9F4bi3Gw masoud@x.y (RSA) 2048 SHA256:QbCO5y5SX+CSHd6++...
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 ...
1
vote
0answers
49 views

SSH server accepts key, but signing fails

I have recently tried migrating from a standard ssh public key setup to managing my keys with GPG. Following instructions on my distribution's wiki, I set up ssh to use gpg-agent instead of the ...
3
votes
2answers
17k 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 ...
0
votes
2answers
55 views

How to restart ssh-agent without relogin

I accidentally killed my ssh-agent, how do I restart it without having to reconnect ? I tried this but it does not work : $ eval $(ssh-agent -s) Agent pid 8055 Then, I open a new Gnome terminal ...
1
vote
2answers
2k views

How to configure ssh-agent-forwarding?

Im struggling with setting up ssh-agent-forwarding. What I want to do: I want to have my public key on a ubuntu-server, the private key locally on my windows machine. I want to connect to the ubuntu-...
5
votes
2answers
781 views

`ssh-agent` asks passphrase after it has been added

I'm new to the ssh-agent and encounter what I identify as a "bug". Situation I have a passphrase-protected private key. I want to use the ssh-agent so I do not write the passphrase each time I ssh. ...
15
votes
4answers
3k 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 ...
1
vote
1answer
331 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 SSH_AUTH_SOCK=/var/folders/...
1
vote
0answers
58 views

Debian 9 - sign_and_send_pubkey

I decided to start switching my machines over from Ubuntu to pure Debian but I'm currently stuck at a hurdle with configuring my git repositories related to ssh. I created a new key and added it to ...
3
votes
3answers
573 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
0answers
31 views

ssh config with ProxyCommand, need to enter passphrase for ssh key on intermediate server

So in this case, we have 3 machines, A (me), B (intermediate), and C (goal). I can ssh from A -> B no problem. B -> C also works, but the key on B is protected by a passphrase. I want to have an ...
6
votes
1answer
3k 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. ...
9
votes
4answers
4k views

Where does gnome-keyring set $SSH_AUTH_SOCK?

I am in the process of getting rid of gnome-keyring as an SSH agent. Things that I have done Searched the internet for hours. Changed stuff and restarted, often. Finally just rm-ed all the autostart ...
2
votes
1answer
151 views

Adding SSH keys to ssh-agent on demand

Instead of invoking ssh-add to add every key to ssh-agent, is it possible to add those keys automatically as soon as they are asked by ssh? Likewise agents launched by desktop environments do? EDIT: ...
5
votes
2answers
370 views

share ssh session/key with remote user

Assume the following setup: User bob is working locally on his workstation foo. User alice is working locally on her workstation bar. User bob has ssh access to server baz:22 via a key stored at bob@...
0
votes
1answer
101 views

How do I use ssh-agent as a wrapper program?

I'm trying to start awesome windows manager as a subprocess of ssh-agent. It worked when I used startx (ssh-agent startx). But now I'm trying to make it work under lightdm. lightdm starts /usr/bin/...
15
votes
3answers
13k views

ssh-add returns with: “Error connecting to agent: No such file or directory”

ssh-add alone is not working: Error connecting to agent: No such file or directory How should I use that tool?
6
votes
2answers
8k views

“ssh-add -d” refused to remove identity

In order to forget private keys passphrase (id_rsa) i usually run: ssh-add -D # to forget all loaded identities ssh-add -d # to forget primary identity ($HOME/.ssh/id_rsa) Now with macOS Sierra v10....
2
votes
1answer
1k 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
4answers
13k 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 are ...
6
votes
4answers
3k views

Windows subsystem for linux - share ssh-agent?

I am running Ubuntu 16.04 within a Windows Subsystem for Linux (WSL) shell on Windows 10. From within a terminal I can start ssh-agent and use it many times over the life of that terminal. I can see ...
3
votes
1answer
551 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 ...
0
votes
1answer
101 views

alternatives to SSH_AUTH_SOCK for the command line

Are there alternatives to the SSH_AUTH_SOCK environment variable for passing agent info to ssh? What I'm looking for is something like -o SshAuthSockPath="/path/to/socket" but nothing like that ...
10
votes
2answers
6k views

gpg-agent refuses SSH keys with ssh-add reporting “agent refused operation”

I'm using openssh7.5p1 and gnupg 2.1.21 on arch linux (these are the default versions that come with arch). I would like to use gpg-agent as an ssh agent. I put the following in my ~/.gnupg/gpg-...
0
votes
0answers
157 views

How to start a systemd service running in an ssh-agent?

The answer to How to start and use ssh-agent as systemd service? gets us a running ssh-agent. How can you write another systemd service file so that its process runs under that ssh-agent? In ...
0
votes
1answer
78 views

Weird behavior of SSH, not using proper key comment

I am using Ubuntu 18.04 LTS. Whenever, I ssh-copy-id for the first time it puts my username@host at the end of the authorized_keys file line as expected. On Remote machine: sacredos@sacredos-DT:~$ ...
0
votes
1answer
167 views

Connecting to SSH authentication agent when running commands with sudo

I use etckeeper to keep my various OS configurations under version control. Until now, I was content to just use a local Git repository to keep track of changes but it occurred to me that I wasn’t ...
9
votes
1answer
1k views

Who is starting my ssh-agent, and why won't it properly terminate?

This is a problem I've been having for a long time, but every time I try to figure something out I get lost, so I figured I'd better ask here where maybe someone more experienced could help me. ...
0
votes
1answer
56 views

How to go back to entering the ssh key password in the terminal

When I upgraded Ubuntu 16.04 to 18.04, one of the changes was that the password prompt to unlock my ssh key (from the agent) now is in a little GUI popup instead of at the terminal prompt. This is ...
0
votes
0answers
51 views

Ubuntu 16.04 - ssh-related commands open a GUI window to ask me for my SSH key password

Whenever I use commands like ssh user@server on the command line, I am not asked directly in the command line for my ssh key password, but in a new window (GUI). However, if I execute eval $(ssh-agent)...
60
votes
2answers
239k 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 ...
2
votes
2answers
613 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 ...
0
votes
1answer
80 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 /etc/ssh/...
10
votes
4answers
15k 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. ...
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?
0
votes
1answer
159 views

Repeated prompts for SSH private key password in single session

I have a private SSH key on a shared development server, which is secured with a password. Even after loading it into ssh-agent, I get re-prompted for the private key password For some reason, even ...
0
votes
1answer
870 views

How to automatically run “ssh-agent bash” and “ssh-add” when log in? [duplicate]

I have a scenario where, whenever a user logs into a CENTOS machine via SSH, I need to have the following commands run: ssh-agent bash ssh-add [This other thread explains why I am using those ...
3
votes
1answer
754 views

How can I suppress host key checking with ssh-agent

I have a script with this snippet: ssh-agent bash -c "ssh-add $SOME_KEY; \ git submodule update --init foo" The script hangs while asking the user: RSA key fingerprint is ...
4
votes
2answers
918 views

Does Gnome Keyring support new-format OpenSSH private keys?

Does gnome-keyring support SSH private keys that are saved in the newer OpenSSH file format? Will Gnome Keyring automatically import those private keys? In more detail: When generating a SSH private ...
0
votes
1answer
54 views

ssh-agent for nested tmux session

sessionA sessionB I start tmux in first window of sessionA but using this command to wake it: ssh-agent tmux that I expect new nested sessionB will have its own ssh-agent listen for it. And ...
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
1answer
28 views

OpenSSH prompts for password for `~/.ssh/id_rsa` which is already in ssh-agent

When I attempt to SSH to a host, ssh still prompts for the password of the ~/.ssh/id_rsa key (Which was generated and exported from PuTTYgen), even though the password is already loaded in ssh-agent (...