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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [ssh-agent]

The tag has no usage guidance.

1
vote
2answers
40 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 ...
0
votes
1answer
46 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 ...
1
vote
2answers
49 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? ...
0
votes
3answers
471 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 ...
0
votes
1answer
460 views

How to use socket file to access server if SSH Agent forwarding is enabled

I have bastion host. I connect to the bastion host using username/password. And I have private key for destination Server. Flow: Local Machine -> Bastion -> Destination I know that It's ...
0
votes
1answer
271 views

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 ...
0
votes
1answer
155 views

Rewrite / Redirect Host With SSH Config File?

My company has three separate jump hosts. Something like: jump1.example.com, jump2.example.com, and jump3.example.com All internal servers must be accessed through these jumphosts: local ---> ...
0
votes
1answer
187 views

How to configure SSH agent to set user for second hop?

Is it possible to connect to a web server and then connect to a git server using SSH agent if the second hop needs a different user? It works if I pass in the user name explicitly. $ ssh web....
1
vote
2answers
272 views

Force the use of a gpg-key as an ssh-key for a given server

I configured ssh to use GPG as my ssh-agent and if I remove the ~/.ssh folder, I can ssh into my server fine using my gpg key. However, my ~/.ssh folder has over a dozen different ssh keys in it, and ...
2
votes
0answers
153 views

force ssh to use agent, without any fallback

Company policy requires some ssh keys to be stored securely, e.g. on dedicated USB device. Using keys not stored on the host machine works flawlessly using gnupg with enable-ssh-support, even when ...
-2
votes
1answer
190 views

ssh force user to user ssh-add

I am trying to understand how this functionality works. I have digital ocean account. I have given digital ocean an ssh public key to associate with any server that I spin up. Once I've created a ...
2
votes
1answer
1k views

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 ...
0
votes
2answers
707 views

Using virt-manager with seahorse instead of ssh-askpass?

On my Arch Linux virt-manager can not connect remote ssh and tells about installing ssh-askpass. As I wan't to use the gnome default seahorse, I was looking for a solution which I didn't find on the ...
1
vote
2answers
1k views

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 ...
0
votes
1answer
241 views

ssh, agent forwarding stops working after a few days …

I've been facing an interesting issue for a few weeks now. Part of our fleet is only reachable via a jump-host. In the past I had no issues w/ logging into the jump-host from my workstation using ...
6
votes
2answers
980 views

In which order does OpenSSH try private keys?

I'm having a hard time finding proper docs on the order in which the OpenSSH client tries private keys for authenticating against a server, given that all of the following are present: key files with ...
1
vote
0answers
412 views

how ssh-agent process is increasing on every login

i have added the following line in my .bashrc file to start ssh-agent if it is not running. if [ -z "$SSH_AUTH_SOCK" ];then eval `ssh-agent -s`;ssh-add ~/.ssh/my_private_key;fi But every time when i ...
0
votes
2answers
701 views

shell script for running ssh-agent

Good day, I have read through the similar topics all day long but unfortunately could not find the answer suitable to my situation. So here is what I'm trying to do. I have the shell script with quite ...
1
vote
2answers
121 views

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 ...
3
votes
1answer
717 views

What is the maximum number of private keys you can use via SSH Agent (Pageant)

While answering Re-using SSH keys I had a question of my own, is there a limit to the number of ssh keys you can hold in ssh agents? (and/or putty pageant). (as a test, I loaded 10 keys into my ...
1
vote
2answers
240 views

`ssh` client not offering the 2nd key in my agent, only offers my default key - what's going on?

I have a second SSH key in my agent, which I added with ssh-add. It comes after my default key, which lives at ~/.ssh/id_rsa. I have a server that has the 2nd key's public key added to it's ...
1
vote
1answer
33 views

Open-SSH Windows Bad Auth Request

I'm trying to use OpenSSH for Windows (Server 2012 R2). I am able to authenticate (using username and password for now) however despite logging in fine it actually shows this error in the log: 2532 ...
2
votes
2answers
129 views

SSH agent forwarding fails depending on intermediaries

I am getting a permission denied when trying to connect over SSH with agent forwarding. I have four machines: my local box (me), a private server (private), a public gateway that can route to the ...
4
votes
1answer
1k views

ssh - retrieve public key from ssh-agent

I am searching for a way to extract the public key from the authentication agent. I want to be able to write the public key out into a file, after i added the key to the ssh-agent (ssh-add ~/.ssh/...
-1
votes
1answer
678 views

How to have multi SSH reverse connections using autossh?

I used autossh in my raspberry pi to connect to one of my VPS. But I have 4 raspberry-pi(s). I used the same script to connect to my remote VPS, so that I can login in every raspberry pi anytime ...
1
vote
1answer
273 views

Prevent duplicates when launching ssh-agent in upstart script

As part of an Upstart script, I need to launch ssh-agent to load a GitHub deployment key, so in the script I have: eval "$(ssh-agent -s)" ssh-add $HOME/.ssh/id_rsa The problem is that when the ...
0
votes
1answer
2k views

ssh: Could not resolve hostname add: Name or service not known

I created non-sudo user and I can't add ssh key while logined with it: % ssh -vvv add ~/.ssh/mykey OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config ...
1
vote
1answer
161 views

ssh-add -l multiple entry for the same private key

192-168-1-103:~ josh$ ssh-add -l 4096 SHA256:4fFdwJ71VIH8rucL9y/3U7jxjctaFcAKmdQZPEqR0Y4 /Users/josh/.ssh/id_rsa (RSA) 4096 SHA256:41kNx5H5yDf1mv6ZNS5W5nSI77WU5qhajLYHvUe6/1A /Users/josh/...
1
vote
1answer
45 views

how to restrict ssh-agent to trusted applications only?

Is there a way to prevent an application from using my ssh-agent keys? I started using an application that uses ssh to access my remote server (possibly for a legitimate reason, according to the ...
0
votes
1answer
770 views

ssh ForwardAgent, “Could not open a connection to your authentication agent.”

I have ForwardAgent yes for a few hosts. One of them started failing recently and I can't find the reason. when I ssh to all hosts and execute ssh-add -l i can see one key just fine. If i ssh to ...
1
vote
1answer
2k views

Jenkins: use ssh-agent and git plugins together

So, I have the following situation: a server with dedicated users for each project (e.g. foo) and a jenkins server which runs as a jenkins user. I've generated an SSH key pair for my foo user and ...
1
vote
0answers
690 views

Enabling SSH for deploy of a bitbucket git repo

I'm trying to deploy my git repo to my server. To make this work I first needed to setup ssh on my locale computer and on my server. for bitbucket I followed https://confluence.atlassian.com/...
0
votes
1answer
640 views

Ansible, Vagrant, sudo and ssh-agent

So I've seen this question and added the Defaults env_keep+=SSH_AUTH_SOCK into my /etc/sudoers file but I am still unable to clone from github on my Vagrant box using sudo: true and sudo_user: <...
0
votes
0answers
247 views

Install keychain on Amazon Linux AMI?

I have a github account that I would like to push to on a regular basis from an Amazon ec2 instance. In order to connect to the github account I have an SSH key that's passphrase protected, so in ...
1
vote
0answers
194 views

sshpass like ssh-agent or vice versa

I like to hold ssh logins for the runtime of a script. For public key authentication, ssh-agent can be used, allowing me to enter the key passphrase once when the script is started. However, that ...
1
vote
1answer
380 views

Openssh in VM authenticate using Pageant on host

Update: It looks like the network design was completely wrong and the auth flow should be the other way round instead. So this question is moot now. Current setup: Linux VM (assume common and most ...
3
votes
2answers
2k views

SSH by key incredibly slow

SSH connecting with key, from my machine suddenly got incredibly slow (~10sec!). It is not a server or DNS problem as far as I can figure out. The problem suddenly appeared after a simple apt-get ...
5
votes
2answers
28k views

ssh server config - input_userauth_request: invalid user

I have a problem configuring my SSH server to be able to log in with public key, without password. tail -f /var/log/auth.log gives Feb 6 14:56:06 ubuntu sshd[24654]: rexec line 26: Deprecated ...
0
votes
1answer
124 views

How to do SSH authentication and CVS update automatically from cron job?

I call a script from cron job. In the script it needs to run CVS commands to update from a remote repository. To do that, it needs to SSH authenticate. I put the following code in the script ... ...
2
votes
1answer
3k views

SSH using Agent Forwarding with Windows Host OS, Vagrant Ubuntu Guest OS, and Keepass/Keeagent

Intent: To be able to deploy to lan-example.com from any dev environment; whether it be directly from the virtual OS, or any single-OS system, or even over the internet using ONE SSH key stored in ...
0
votes
1answer
178 views

ssh-agent not caching one key, but caches another

I'm on Mac OS X 10.9.5 and ssh agent is working just fine for two of my keys (include the main one, ~/.ssh/id_rsa). However, for my AWS key, it asks me for the passphase every time. I'm unsure why. ...
0
votes
1answer
75 views

Is my private key safe if I use authenticaiton agent forwarding with the ssh -A option?

I love the option to connect to servers via SSH with the -A option, so I can use my private keys on the server. This lets me update git/svn repositories and connect to other servers without the need ...
0
votes
0answers
51 views

Enable root password on remote server

I'm playing around with ssh-with-rsa-key authorization instead of password authorization and because I'm not really clever I've locked password authorization for root(passwd -l root) on remote server. ...
0
votes
1answer
368 views

How to forward SSH agent connection to unqualified hostnames by default?

I have a number of local domains in my resolv.conf search order. I would very much like to forward SSH agent by default when I connect to an unqualified (without DNS suffix) hostname. The best I've ...
1
vote
1answer
373 views

OSX: ssh-agent caching passphrases…but when cleared?

I have a ssh RSA key in a client OSX 10.9.4. The SSH server is ubuntu. Everything works OK, but the problem is that my OSX ssh-agent seems to be caching the passphrases. The first time I ssh, it is ...
2
votes
2answers
385 views

copy between remote server with local authentication

When I need to copy some files between two remote servers, I usually scp -3 user@server1:path user@server2:path unfortunately, since that routes traffic through my machine, that is very slow when ...
7
votes
2answers
24k views

SSH key problems: Not a RSA1 key file unknown key type '-----BEGIN'

A backuppc server is able to sign into remote machines as root and backup them up, but if I sign in as the backuppc user and try to ssh into these machines using the same key, the key is rejected with ...
4
votes
1answer
2k views

rsync from remote ssh server with forwarded keys

Context I am writing a synchronisation script to sync some web environments. Ex: Update integration from production (mostly to fetch new database rows and uploaded files) Some of my prerequisites ...
25
votes
2answers
8k views

Use a specific forwarded key from SSH-agent?

Let's say I have a key for Github, along with other keys. I've added lots of keys to my ssh agent (ssh-add -L returns lots of lines) at my home computer A. In my .ssh/config I have set up which key to ...
13
votes
9answers
207k views

SSH: Permission denied (publickey,gssapi-with-mic,password)

==================================================================== UPDATE: It turned out the configuration of sshd on host2 wont allow password login. Thanks to people answered this. =============...