CentOS 5 の OpenSSH は AllowAgentForwarding の設定をサポートしていないみたい。だからと言って AgentForwarding できないわけじゃなくて明示的に OFF にできないだけ。
rpm -qf /usr/sbin/sshd openssh-server-4.3p2-41.el5 echo -e "\nAllowAgentForwarding yes" >> /etc/ssh/sshd_config /sbin/service sshd restart Stopping sshd: [ OK ] Starting sshd: /etc/ssh/sshd_config: line 121: Bad configuration option: AllowAgentForwarding /etc/ssh/sshd_config: terminating, 1 bad configuration options [FAILED]
OpenSSH 5.6p1 を入れたら AllowAgentForwarding 設定が使える。
yum -y install gcc make zlib-devel pam-devel openssl-devel tar zxf openssh-5.6p1.tar.gz cd openssh-5.6p1/ ./configure --prefix=/usr/local/openssh-5.6p1 --with-tcp-wrappers --with-pam make make install echo -e "\nPort 2222\nUsePAM yes\nAllowAgentForwarding yes" >> /usr/local/openssh-5.6p1/etc/sshd_config /usr/local/openssh-5.6p1/sbin/sshd