Questions tagged [ssh-agent]
144 questions
3
votes
2 answers
Discrepancy in ssh-agent behavior
It seems like i'm having a bit of a discrepancy between the behavior of ssh-agent for two accounts I have configured.
I wrote a simple monitoring script to check on the availability of some VMs we have running. I did all the testing and debugging…

tdk2fe
- 600
- 2
- 13
3
votes
1 answer
Retain agent-forwarding in sudo
I want to be able to connect to a server, start a sudo shell, then use agent forwarding to connect to another server (in order to use SCP to copy files to a protected area). But:
ubuntu@tunnelator:/var/www$ ssh -p 10022 stevebennett@localhost
Last…

Steve Bennett
- 5,750
- 12
- 47
- 59
3
votes
4 answers
12.04LTS - could not open a connection to your authentication agent
I'm working on adding ssh authentication to a fresh Linode Ubuntu 12.04LTS deployment. I followed their guide to the letter up to the point where I need to ssh into the box with my now freshly added ssh key, but I instead get:
"Error: agent admitted…

Alexandr Kurilin
- 566
- 1
- 8
- 22
3
votes
2 answers
SSH agent forwarding on debian squeeze
Im trying to set up SSH forwarding like this
osx > debianA > debianB
I can connect to debianA fine, using ssh -A and it has the following env vars when i do:
SSH_AGENT_PID=1543
SSH_AUTH_SOCK=/tmp/ssh-giwdYY1542/agent.1542
SSH_CLIENT='92.233.199.x…

nfvindaloo
- 131
- 3
3
votes
1 answer
Any tricks for making sshfs authenticate only on write?
There is seemingly a trick for creating read-only sshfs logins with the read only attribute is enforced by the remote's ~/.ssh/authorized_keys file.
You first create a program ~/.ssh/ro-sftp-server that runs sftp-server -R, which whatever other…

Jeff Burdges
- 156
- 2
- 7
3
votes
4 answers
How to use ssh to copy a file multiple hops with agent forwarding?
I have a group of servers all properly configured with SSH agent forwarding. It is a typical bastion server style configuration where the only machine you can connect to from the outside is server A. From server A you can use agent forwarding to…

Apreche
- 1,405
- 5
- 17
- 20
3
votes
1 answer
SSH-agent & SSH-add at reboot
Situation: Running Ubuntu 10.04. I have a bash script that tar's a bunch of folders and copies them to another host over ssh. I've copied the public key to the other host so it doesn't prompt for a password.
I run eval ssh-agent (with extra quotes)…

Jan Henckens
- 512
- 2
- 9
- 20
3
votes
3 answers
How to fix "Could not open a connection to your authentication agent." error when trying to add ssh-key?
I'm using Ubuntu server 10.04.
ssh-add /foo/cert.pem gave the following output:
Could not open a connection to your
authentication agent.
These are my running processes:
ps -aux | grep ssh
Warning: bad ps syntax, perhaps a bogus '-'? See…

theTuxRacer
- 549
- 2
- 9
- 22
3
votes
1 answer
SSH agent: `sign_and_send_pubkey: signing failed for ECDSA-SK ... from agent: agent refused operation` except very first time
I have an ecdsa-sk keypair that I generated and added to my github account (tied to a yubikey). If I try any connection using that key, such as git push, I get:
sign_and_send_pubkey: signing failed for ECDSA-SK "[...]/.ssh/id_ecdsa_sk" from agent:…

Allen
- 131
- 6
3
votes
0 answers
How to use Windows 10 OpenSSH ssh-agent service with Cygwin?
I'm using the Visual Studio Code Remote - SSH extension on a Windows 10 laptop to access a bunch of Linux development servers. I followed these instructions to set up the Windows built-in ssh-agent service, which is basically a few lines in an…

kbro
- 260
- 1
- 2
- 12
2
votes
1 answer
rsync not using the ssh-agent?
I have this running on gitlab ci, and it works for regular ssh (copied from the gitlab ci docs):
eval $(ssh-agent -s)
ssh-add <(echo "$SSH_PRIVATE_KEY")
mkdir -p ~/.ssh
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
This gives…

Sarke
- 411
- 1
- 5
- 12
2
votes
2 answers
Securely sharing SSH access in a team with SSH bastion
I need to share SSH access to a number of servers with my teammates and looking for a secure way to do it. I came up with a configuration involving a SSH bastion server, but not sure how (and if) it could be done.
I want to have only one SSH key…

ivangretsky
- 141
- 2
2
votes
1 answer
pssh and ssh-agent key forwarding via jump host
I'm trying to connect to a number of hosts using pssh in combination with a jump host and ssh-agent key forwarding.
Unfortunately this fails quiet regular, but with different hosts failing on. So this is only an example which would look different…

frlan
- 573
- 1
- 8
- 27
2
votes
2 answers
How can I check lifetime of SSH keys loaded to agent?
I'm using OpenSSH on Linux. For securioty reasons, when I load keys to agent, I use -t option, to limit time of availability of the keys (generally for 10 hours or so).
Is there any way to list all loaded keys with their "expiry" time?

Huash7ee
- 45
- 1
- 4
2
votes
2 answers
Making ssh agent available in screen after I logout
What is the best way to enable a command running in screen on a first machine to continue to be able to run commands on a second machine after I am no longer connected to the first?
Here is the background. I have a long running command which needs…

btilly
- 123
- 3