6

I've used the ssh-agent from oh-my-zsh to manage my SSH key. So far, so good, i only have to type the passphrase for my private key once when I start my shell and public key authentication works great.

The problem is however that key forwarding doesn't work. There are 2 servers A & B which I can use public key to login. When I ssh into A then from there ssh into B, I must provide my password, which should not be the case.

A is a CentOS 5.6 box, B is an Ubuntu 11.04 box. I have this on my local .ssh/config:

Host *
    ForwardAgent yes

OpenSSH on A is standard openssh 4.3 package provided by CentOS. I also enable ForwardAgent for ssh client on A, but forwarding still doesn't work.

Lamnk
  • 1,095
  • 3
  • 11
  • 17

1 Answers1

6

Make sure AllowAgentForwarding is set to yes on the servers (sshd_config).

My guess is you are missing that.

Also forwarding is only on openssh 5.1+ So make sure you are running a valid version

Mike
  • 22,310
  • 7
  • 56
  • 79
  • 3
    I googled and openssh prior to 5.1 has agent forwarding enabled by default. `AllowAgentForwardingg` option is added to turn it on/off. – Lamnk Jun 08 '11 at 10:24