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.

3
votes
2answers
837 views

How can I get computer to remember SSH key passphrase between reboots?

I've found various solutions to cache SSH key passphrases using such methods as ssh-agent, keychain, gpg-agent and so on. They all seem to cache it per-login or per-session, so that every time you ...
2
votes
1answer
299 views

How can I prioritize a ssh Forwarded Agent over an Identity File?

I was previously able to connect to my a server with ssh agent forwarding: ssh -A my.server And from there connect to another host on the server's network that had my public key in the ...
2
votes
1answer
56 views

How to speed up ssh-agent?

I use ssh to log into many servers. When running a script that does this, ssh-agent uses 100% CPU time. For small tasks on many servers ssh-agent is now the bottleneck. Is there anything I can do to ...
1
vote
1answer
177 views

NX on a centos server and connect a windows 7

I have a centOS 6.5 server cat /etc/*elease CentOS release 6.5 (Final) I tried to install the NX on it using this document https://wiki.centos.org/HowTos/FreeNX This is how I install it because the ...
0
votes
1answer
50 views

Is it possible to auto copy keys from ssh config to ssh agent? how?

I have the ~/.ssh/config file I'm using to manage different keys from different hosts. However, each time a new key is added, I'll need to also manually add this to ssh agent via ssh-add for separate ...
55
votes
1answer
15k views

Why eval the output of ssh-agent?

In order to run ssh-agent I have to use eval $(ssh-agent) Why do I have to eval the output of ssh-agent? Why isn't it designed so that I can just run it? Note: Backticks (`) removed as they are ...
1
vote
1answer
141 views

More than one ssh-agent

I've recently installed Lubuntu and openssh-server. I can't understand why do I have two ssh-agent process now running in my computer: user1@machine:~$ ps -auwxxx | grep ssh root 863 0.0 0.1 ...
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 ...
4
votes
2answers
892 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 ...
8
votes
2answers
2k views

Force SSH to ask my private key passphrase in the shell (not in a window)

When I use SSH for the first time after booting, it asks me for my private key unlocking passphrase (which is the behaviour I expect). But it does so in a window, not in the shell (similar to gksudo ...
2
votes
0answers
83 views

Using lpass to unlock an ssh key

I'm using the Lastpass CLI (lpass) and want to have it give the passphrase for a private key direct to add-ssh on login as part of .bashrc . the net effect is that I login to Lastpass on when I start ...
0
votes
1answer
815 views

Using GPG-agent, the ssh-agent does not show the keys using “ssh-add -l”

I've been trying to get a yubikey to work as an authentication method for remote connections via ssh using this guide. I got the gpg2 set up nicely, and I can see that i've loaded the key onto the ...
3
votes
2answers
2k views

ssh-agent not working properly

I'm currently trying to get ssh-agent to work. No matter what I'm doing, I just can't get the around the password prompt. For testing I even tried connecting to localhost: ssh-keygen to generate the ...
58
votes
2answers
231k 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 ...
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? ...
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 ...
5
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....
1
vote
0answers
272 views

git ssh alias not working unless I add the key to ssh-agent (OSX)

I added a ssh alias to use a different key-pair for a certain domain. The key does not have a passphrase. I had followed the directions at https://confluence.atlassian.com/bitbucket/configure-...
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 ...
2
votes
1answer
449 views

How to add a phrase-less key to ssh agent?

On running the command ssh-add mykey.ppk it asks for passphrase: Enter passphrase for mykey.ppk: But I can see that the key does not have any passphrase and is not encrypted $ head mykey.ppk ...
6
votes
3answers
5k views

ssh-add add all private keys in .ssh directory

In my day-to-day, I need to ssh to various machines, all of which I have a different private key for. When I start a new shell session - only my default id_rsa is added to the ssh key chain - I have ...
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
542 views

Use specific key in a forwardagent ssh call?

when I ssh to a server I can use a few options to specify which key is used, for example: ssh -o identityfile=~/.ssh/cool -o identitiesonly=yes serverA This prevents too many tries, which could end ...
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 ...
1
vote
2answers
807 views

OSX ssh-add -K not working for iMac

I am currently trying to ssh into my hosting server I have created authorised keys and added the .pub to my hosting. To save the keys so I don't have to keep doing ssh-add I ran the command ssh-add -...
2
votes
1answer
3k views

How do I stop using ssh-agent?

I use my keys without any password because all machines involved operate in a fairly closed environment. So I do not need ssh-agent. But I accidentally ran a script that seems to have enabled it use, ...
0
votes
1answer
110 views

Returned to login screen when using ssh-askpass during login

I'm trying to set up ssh-add/ssh-askpass so that it asks me for my ssh key passwords when I first login to my desktop environment. I've added a .xsession file to my home directory which contains ...
1
vote
2answers
1k views

git not using global config file or public key

I've setup a global git username and password while logged in as root on my Fedora server with the following commands: git config --global user.email "[my email]" git config --global user.name "[my ...
1
vote
1answer
4k views

How to automatically add keyfile and passphrase to ssh-agent?

Linux 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I use the script to start ssh-agent and start other script (which is using expect to sent passphrase ...
5
votes
2answers
764 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. ...
0
votes
2answers
76 views

Automatically login to an ssh-agent session in a non-user shell

My team shares a user account via a non-user shell on a few systems for reasons beyond our control. We all move our passphrase protected private keys to the share'd users ~/.ssh directory. We normally ...
0
votes
1answer
4k views

Prevent ssh-agent from starting in Ubuntu 16.04

I started ssh-agent using: eval $(ssh-agent) ssh-add /path/to/key on one of the servers (Ubuntu 16.04) to allow for rsync, and had thought that the session for the ssh-agent will expire after ...
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 ...
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: $...
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 ...
1
vote
1answer
795 views

ssh-agent: How to keep the login key, and add more identities?

When I log in to my local Ubuntu 14 instance from Windows (I use SecureCRT as a SSH client) using my RSA key, the key is available for forwarding for further SSH sessions (it is listed with ssh-add -l)...
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>....
0
votes
1answer
286 views

Ansible: running from virtualenvwrapper with pip installation

I'm trying to test ansible with a "pip" installation of ansible in a virtualenv of python managed by virtualenvwrapper. However, I am having problems to use the ssh-agent and the SSH keys: (ansible)$ ...
2
votes
1answer
158 views

How to clear SSH keys from script run as root?

I want to configure my laptop to clear all my SSH keys from the authentication agent when I close the lid of my laptop. Clearing the keys can be done by running ssh-add -D. Running a script when ...
-1
votes
1answer
49 views

find one difference…(or more) [closed]

I have two servers (debian). Almost identical. I want to use SSH AgentForwarding. I try to login from A to B and from B to A: On user@A: set | grep SSH SSH_AUTH_SOCK=/tmp/ssh-uEsiAIsssn/agent.1234 ...
1
vote
2answers
5k views

ssh algorithm negotiation failed

Problem Ok, the problem is that I am using Pycharm on El Capitan. I am trying to connect to a server that has strict login Kexalgorithms using the newer Key Exchange Algorithms than Pycharm seems to ...
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 ...
2
votes
1answer
153 views

xautolock/ssh-add can't interact with ssh-agent if launched from .xsessionrc

I use xautolock to lock the screen and suspend my laptop after a given amount of time of inactivity. This works fine. This is how xautolock is started from .xsessionrc: xautolock -time 60 -...
2
votes
2answers
2k views

How can I avoid always having to use `eval 'ssh-agent -s'`

I can't figure out why everytime I ssh back into my server I always have to start my ssh agent with the command eval 'ssh-agent -s' followed by ssh-add <my_key.pem> in order to successfully ssh ...
1
vote
1answer
319 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/...
8
votes
1answer
866 views

Detecting the remaining lifetime of an ssh-agent identity

The ssh-add command lets you specify the lifetime of an identity being added to ssh-agent. For example, if I type ssh-add -t 1h the identify will expire after 1 hour. I can then list the identities ...
1
vote
2answers
948 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 ...
1
vote
1answer
1k views

How to force ssh-add to ask passphrase when loading RSA key from FIFO?

I've created the following RSA key (with passphrase): ssh-keygen -t rsa -f rsa_foo Now when adding the key in normal way, ssh-add asks for the passphrase fine: $ ssh-add rsa_foo Enter passphrase ...
1
vote
1answer
271 views

SSH Agent admitted failure to sign using the keys

I have upgraded my debian from wheezy to jessie. A ssh-agent is started when I launch my wm (awesome launch via gdm3), I can do ssh-add The env vars about ssh are correctly set. ps aux |grep ssh-...
0
votes
0answers
3k views

How to restart ssh server / sshd on Linux?

I am trying to restart the ssh server on my server which is running Fedora Cloud. I have tried the method here http://www.cyberciti.biz/faq/howto-restart-ssh/ (# service sshd restart) and get Failed ...