Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [ssh-agent]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

Cant install Ops Agent on VM instances but Warning: apt-key is deprecated

I have recently migrated my 3 websites from a standard server to the GCP -VM Instances (very happy with the performance improvement). However, I cannot install an Ops Agent to view more stats on ...
Hendi - SA's user avatar
1 vote
1 answer
110 views

Even if SSH is set up, it always asks for the password when logging into the server

I have an Ubuntu server. I use ssh to access it. It worked fine at first. When user@IP is given along with SSH key, it will log into the server without asking for password. But recently, even with SSH,...
Sachintha madhawa's user avatar
0 votes
1 answer
106 views

ssh prompts for password despite gcr-ssh-agent

I'm trying to set up GNOME-Keyring such that when it is unlocked after login, it will also allow me to use my SSH key, which is encrypted. This is a Debian 12 system. The key in question is an ed25519 ...
Kalsan's user avatar
  • 131
0 votes
1 answer
21 views

Understand SSH AgentForwarding per Host specification

Disclaimer: originally I asked this question on StackOverflow and it was legitimately marked off-topic and think it fits better here. In the meantime I found the problem (see intermediate solution ...
Pascal's user avatar
  • 103
1 vote
0 answers
139 views

PuTTY, Cygwin, ssh-pageant: unable to connect to pipe, error: 3

On a new Windows 11 system, with Cygwin, using the ssh-pageant version 1.4 which comes with Cygwin, I cannot make it work with PuTTY 0.80. The ssh client reports "unable to connect to pipe, error:...
Thierry Lelegard's user avatar
0 votes
2 answers
299 views

SSH agent forwarding when Host and Hostname different

On my client I have an SSH agent setup and the following example config Host gitserver Hostname gitserver.example.com ForwardAgent yes User git IdentityFile C:\Users\user\.ssh\id_rsa.pub ...
Benargee's user avatar
0 votes
1 answer
4k views

What is the host key (the one from ssh connection) and how is it different from public-private key pair?

The situation is that I've had a VPS created previously. It was all set up, private-public key authentication, root login turned off, password login turned off. Everything was set up. Then this server ...
michal roesler's user avatar
1 vote
1 answer
370 views

The ssh-agent process is not visible to the user who created it but is visible to root

I have adopted the following snippet from Visual Studio Code's documentaion to create an ssh-agent on login: if [ -z "$SSH_AUTH_SOCK" ]; then # Check for a currently running instance of ...
Matt's user avatar
  • 111
2 votes
2 answers
906 views

Avoid SSH AgentForwarding of incompatible keys

Good morning, I have one ed25519-sk key (using a hardware token), which I need only on my personal machine for some high security servers (all Debian). This key type is supported by OpenSSH 8.3+. We ...
Powerriegel's user avatar
2 votes
1 answer
539 views

How to create an SSH tunneling agent via HTTPS?

How to allow SSH when the network is blocked on all ports except HTTP and HTTPS? I'm curious to know how I can create a SSH tunnel which allows me to SSH via 443 and will work even after the server is ...
SSSK's user avatar
  • 21
0 votes
0 answers
706 views

Can't ssh into cloud shell

I try to ssh from my local host to GCP cloud shell and get the error: $ gcloud cloud-shell ssh --authorize-session sign_and_send_pubkey: signing failed for RSA "/home/kossak/.ssh/...
Kossak's user avatar
  • 101
3 votes
1 answer
5k views

How to check if SSH agent forwarding is running, from the remote server?

Locally, I've turned on the SSH agent and I've added my key: $ eval $(ssh-agent) Agent pid 80 $ ssh-add Identity added: /c/Users/...../.ssh/id_rsa (.....@........) In my ~/.ssh/config, I have this: ...
dodov's user avatar
  • 151
0 votes
1 answer
77 views

Cannot add passwordless private key with ssh-add on remote server

I can add a passwordless id_ed25519 file locally using ssh-add -k, but not on my remote server. Locally: ☁ ~ ssh-add -l The agent has no identities. ☁ ~ ssh-add -k ~/.ssh/id_ed25519 Identity added:...
iftheshoefritz's user avatar
7 votes
3 answers
9k views

SSH Agent forwarding not working on Ubuntu 22.04

I am trying to connect to github over ssh on my remote server (Running Ubuntu 22.04). On my local computer (Running Win 10), I have ~/.ssh/config file with the following: Host remote HostName ...
mr.d's user avatar
  • 213
0 votes
1 answer
1k views

openssh connection from windows with yubikey ED25519-SK denied

I use my yubikey to authenticate against remote hosts with ssh. This works (with the same keys) on Linux, and it fails on Windows, with git-bash. all this is on windows 10, and this is OpenSSH_9.0p1, ...
Andreas Schuldei's user avatar
4 votes
1 answer
2k views

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 ...
Allen's user avatar
  • 143
1 vote
0 answers
442 views

How to send different explicit ssh identities *from agent* to same server?

Some services like github and gitlab distinguish between users based on the SSH identity sent. One way to do this is to have different host aliases in ~/.ssh/config: Host user1-github HostName github....
cdleonard's user avatar
  • 123
0 votes
0 answers
173 views

Is there a way to repair SSH On GCP VM after shielded VM failure

I have a GCP VM on which is installed a Docker with Drupal. e2-medium with SSD 10Go After increasing the disk size to 20GB, I can no longer access the VM in SSH. My VM was failing to boot because of a ...
Kiswend's user avatar
0 votes
1 answer
181 views

How to forward the .config file to remote host together with the agent?

I have a GitLab server configured on a non-standard port. I am using ssh protocol to clone and push, and I have configured the correct port entry in the .config file of ssh. Now, I need to connect to ...
Tommaso Bendinelli's user avatar
11 votes
1 answer
96k views

Pass password in ssh config

Is there any way to pass a password using .ssh/config? I'm trying to set up a way to login to a server under a specific user and then switch automatically to root when I connect (need to input ...
cduma's user avatar
  • 111
0 votes
1 answer
464 views

ssh TOTP connection with jump host forwarding

How can I simplify this? Perhaps using agent forwarding? I have an SSH jump host with 2FA via TOTP x2 and a machine which uses 2FA as well(jump host and machine): ssh [email protected] -L 22222:...
Georg Heiler's user avatar
2 votes
0 answers
253 views

What is GPG equivalent of ssh-add?

When using password-secured SSH keys I can use ssh-add to preemptively unlock a key before it needs to be used and have it cached in ssh-agent for future use. What is a GPG equivalent of ssh-add? I ...
Jan Stolarek's user avatar
0 votes
1 answer
195 views

DigitalOcean Droplet ssh to use a named key

It's been a while since I've done this and configured ssh keys. I generated an ssh key with a different file name than id_rsa I have a DigitalOcean Droplet where I placed a named ssh key pair on ...
Kyle Calica-St's user avatar
0 votes
0 answers
1k views

The ssh agent cannot 'resolve hostname' when called from within a bash script

I have a bash script #!/bin/bash scp -r some_directory remote_host:~ which I made executable with chmod u+x. The remote_host has been defined in my .ssh/config as follows: Host remote_host HostName ...
Marlo's user avatar
  • 105
0 votes
1 answer
759 views

How to specify identity when using SSH agent?

I've got a slightly unusual use-case... I'm using SSH via certificates, (where the authentication mechanism isn't just a signature from a private key, but also presentation of a signed cert). I have ...
Woodstock's user avatar
  • 113
0 votes
2 answers
490 views

Why isn't ssh-agent a background process by default?

I have always wondered why such a basic feature (loading ssh keys for persistent usage) requires a clunky command to execute in the background of a cmdline. Why isn't ssh-agent a service (for example) ...
rosstex's user avatar
  • 133
5 votes
0 answers
1k views

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 ...
kbro's user avatar
  • 290
0 votes
1 answer
652 views

Avoid use of SSH agent

I use ProxyCommand with the intention of avoiding ssh agent forwarding. Today I noticed that Gnome was starting ssh-agent, which I'm trying to avoid using so I disabled it. I'd like to not have the ...
Gus's user avatar
  • 127
4 votes
1 answer
14k views

ssh-add returns "Error connecting to agent: No such file or directory" even though agent is running

Windows 10 20H2, build 19042.685 I'm trying to use the SSH agent in the built-in OpenSSH client on Windows 10. The agent is running: C:\Users\Daniel> Get-Service | ?{$_.Name -like '*ssh-agent*'} ...
Daniel Lo Nigro's user avatar
2 votes
0 answers
1k views

Check if ssh-agent forwarding is allowed on server with restricted permissions

How can I, as a user logged in to a remote server via ssh, check if ssh-agent forwarding is permitted on that server? Restrictions: The tool 'sshd_config' either doesn't exist on this system, or I ...
Ben Farmer's user avatar
0 votes
1 answer
512 views

automatic SSH login with ssh key's dont work after sudo

I have an Ansible server with 3 ubuntu servers (hosts). So i want to be able to logon to those servers by typing in the SSH key password once. I have edited my .bashrc with an alias. alias ssha='eval $...
Mike milkshake's user avatar
7 votes
1 answer
3k views

Does SSH allow jump host to access forwarded agent?

If I SSH to targethost via jumphost with agent forwarding enabled, will jumphost have access to my SSH key agent? ssh -A -J user1@jumphost user2@targethost Is this still secure, if I don't fully ...
larsch's user avatar
  • 171
3 votes
0 answers
1k views

SSH freezes after couple of lines printing

I am having this weird issue with a server whenever I try to open htop over ssh it hangs, ls works but ls -l hangs after couple of line if I execute history it hangs after printing 50+ line. But mosh ...
Nazmul Ahasan's user avatar
3 votes
1 answer
416 views

How can I use different ssh keys for user1@host and user2@host, without resorting to aliased hostnames?

I have a remote CentOS server, lets pretend it's called hostname.com hostname.com has several user accounts, and I want to ssh into this server as any one of these users (using ssh keys rather than ...
carpii's user avatar
  • 561
2 votes
1 answer
5k views

Reconnect automatically to a disconnected ssh session [closed]

I am new to this community , I am working on my iot project in which my microcontroller is working as a server, taking data and executing request. My client is end device (mobile,tablet) and I am ...
adil kampoo's user avatar
13 votes
3 answers
7k views

How to prioritize explicit ssh key from commandline over ssh-agent keys?

I have a bunch of ssh keys loaded semi-permanently into ssh-agent. ssh-add -L lists 6 keys. I also have other keys which are stored separately; let's say, on a USB stick. I exactly don't want to keep ...
ulidtko's user avatar
  • 448
1 vote
2 answers
3k views

Ansible not honouring `ssh-agent`?

I seem to be having a problem where Ansible isn't using my SSH agent cache. I've run the following: eval `ssh-agent` ssh-add /tmp/key Then I successfully log into one of the hosts from my inventory ...
RandomInsano's user avatar
0 votes
1 answer
2k views

How to connect GCP, VM machine with WinSCP

I created Virtual machine (VM) instance in the GCP but unable to connect with WinSCP from the windows machine. I created on VM instance in the GCP then generated pub key by using command ssh-keygen ...
Hari Om Gupta's user avatar
0 votes
1 answer
968 views

Using Password-Protected SSH Keys for Unattended Scripts on Remote Server

From PC1, I SSH into SERVER1 where I have a bash script, that will SSH & auth to SERVER2 using an SSH-key that's password-protected. Everything works fine when I manually execute my script, using ...
Mark Sanchez's user avatar
1 vote
0 answers
291 views

SSH agent forwarding not working on LSF when using BSUB

At my institute we have a cluster that runs LSF. Via this cluster, I want to connect to other computers/servers using Agent Forwarding. This works fine when I am on the login node, however when I am ...
woos's user avatar
  • 11
2 votes
4 answers
7k views

Running ssh-add from git bash using Windows 10's OpenSSH

I've setup OpenSSH following the 2019 Update of this question including setting GIT_SSH=C:\Windows\System32\OpenSSH\ssh.exe. Which works great, except when using when using git from git bash I get ...
Aaron N. Brock's user avatar
1 vote
1 answer
2k views

too many ssh-agent process per user on several servers [closed]

Several users seem to have problems with the usage of ssh-agent in their login environment. sri for instance has 1295 of them running on login02. And many other users are having same issue. I am ...
gokam's user avatar
  • 13
1 vote
0 answers
1k views

Configure ssh-agent for TeamCity agent

I have TeamCity agents installed on a CentOS 7.3 server, and am trying to use the "SSH agent" build feature for a script that uses scp. However, it always fails due to a TimeoutException: [12:39:32] ...
Brad Mace's user avatar
  • 1,024
1 vote
1 answer
1k views

SSH agent forwarding is not working when SVN+SSH

I'm trying to automate the deployment of an SVN repository (with a web app) over multiple production servers, without installing any private key on the servers. The SVN server is hosted on srv3, and ...
Adrien GODDARD's user avatar
1 vote
1 answer
655 views

Is there a way to do SSH password-less login when the server only allows keyboard-interactive authentication?

Suppose I've got a server foo.com which only allows keyboard-interactive authentication, and that I can't change this. This means I can do, sshpass -p PASSWORD ssh foo.com but I can't create public/...
marius's user avatar
  • 111
3 votes
1 answer
3k views

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\...
Sarke's user avatar
  • 461
1 vote
2 answers
1k views

How to keep ssh-agent always runnning on Ubuntu server

I'm trying to set up backing up some folder from one server (target server) to another (backup server) using rsync. I also need to call rsync from backup server so it's easier to maintain backup ...
Den Kasyanov's user avatar
3 votes
1 answer
1k views

SSH ignores key in agent and keeps asking for key decryption password

In my ssh_config, I have configured SSH to use a specific key when connecting to a host. I want SSH to try only this key, not any other key it may find (in ssh agent or some other location), so I ...
Jan Warchoł's user avatar
2 votes
3 answers
2k views

Does SSHFS support ssh-agent forwarding?

I'd like to be able to mount my backup server on-demand by using my keys on my client terminal only as I don't leave my SSH keys on servers I manage. Does SSHFS support ssh-gent forwarding and how? ...
dzhi's user avatar
  • 830
0 votes
3 answers
4k views

Allowing SSH To use ssh-agent in bash script

I am working on recon for a set of systems my company is taking over and they use a different authentication method than we do. Specifically we use AD auth and a jump server to access systems where ...
Ryan Smith's user avatar