Questions tagged [ssh-agent]

133 questions
181
votes
11 answers

ssh-agent forwarding and sudo to another user

If I have a server A into which I can login with my ssh key and I have the ability to "sudo su - otheruser", I lose key forwarding, because the env variables are removed and the socket is only readable by my original user. Is there a way I can…
Florian Schulze
38
votes
2 answers

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 use with which host, so e.g. ssh -T -vvv…
danmichaelo
  • 482
  • 1
  • 4
  • 8
27
votes
9 answers

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…
gherkin
  • 391
  • 1
  • 3
  • 6
26
votes
6 answers

Can I use PLink and Pageant with Cygwin's ssh?

I'm now using msysgit because of the GUI tools, which use Putty's Pageant and PLink utilities, but I use Cygwin as a general SSH terminal. I had been using ssh-agent on Cygwin, but that means I have to enter my SSH key passphrases for both SSH key…
Jerph
  • 369
  • 1
  • 4
  • 6
24
votes
8 answers

Running ssh-agent from a shell script

I'm trying to create a shell script that, among other things, starts up ssh-agent and adds a private key to the agent. Example: #!/bin/bash # ... ssh-agent $SHELL ssh-add /path/to/key # ... The problem with this is ssh-agent apparently kicks off…
Dan
  • 647
  • 2
  • 8
  • 11
16
votes
1 answer

SSH ForwardAgent multiple hops

I've been looking for a solution to the following problem for the past 2 hours with no luck. Development: I'm using publickey authentication to connect to my servers. I use ssh-agent forwarding in order to not have to manage public/privates…
liquidity
  • 408
  • 1
  • 7
  • 22
16
votes
1 answer

How to add SSH key to PuTTY Agent at startup in Windows Server?

I need to add a private SSH key to Putty Agent (pagent.exe) every time a Windows server starts up -- before a user logs on interactively. The key is to be used by a service. If it was a regular user that needed to use the key, I would just place a…
12
votes
1 answer

Accessing SSH_AUTH_SOCK from another non-root user

The Scenario: I am running ssh-agent on my local PC, and all my servers/clients are setup to forward SSH agent auth. I can hop between all my machines using the ssh-agent on my local PC. That works. I need to be able to SSH to a machine as myself…
Danny F
  • 488
  • 3
  • 10
12
votes
4 answers

Choose identity from ssh-agent by file name

Problem: I have some 20-30 ssh-agent identities. Most servers refuse authentication with Too many failed authentications, as SSH usually won't let me try 20 different keys to log in. At the moment, I am specifying the identity file for every host…
leoluk
  • 491
  • 6
  • 10
11
votes
2 answers

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 default names in ~/.ssh, e.g. ~/.ssh/id_rsa, key…
sschuberth
  • 213
  • 2
  • 7
10
votes
3 answers

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 the following debug output: OpenSSH_5.3p1,…
HAL9000
  • 139
  • 1
  • 3
  • 8
7
votes
2 answers

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 option RhostsAuthentication Feb 6 14:56:28 ubuntu…
Philipp
  • 171
  • 1
  • 1
  • 2
7
votes
2 answers

SSH/SFTP connections fails silently on OSX 10.8.2 - ssh-agent issue

I'm trying to login to a remote machine with SSH or SFTP. when I try ssh u-indgo@ssh1.eu1.frbit.com the CLI just won't respond. I get an empty new line, in which I can type characters, but nothing more. when I try to connect with SFTP using the…
Matanya
  • 21
  • 1
  • 9
7
votes
3 answers

Allow only specific keys in agent forwarding?

Is it possible to use agent forwarding excluding all keys from being forwarded, except ones specifically stated? Alternatively, are there any ways to specify the order the keys are tried per session? Using ssh-agent requires managing different…
dgo.a
  • 209
  • 1
  • 8
7
votes
2 answers

Is it possible to use ssh key which contents is specified in environment variable?

I'm working on remote servers and I need to do a git clone from a another server using my private key. But I don't want to store my key on the remote servers. I want to avoid storing ssh key on the remote servers at all, even in a temporary file. Is…
iafonov
  • 173
  • 1
  • 4
1
2 3
8 9