我正在嘗試爲我正在使用的webapp設置Capistrano,並且無法讓代理轉發工作。SSH忽略我的ForwardAgent配置?
這裏是我的~/.ssh/config
:
Host rs
Hostname <ip of my server>
ForwardAgent yes
User root
而且我不覺得默認的設置覆蓋任何東西,因爲ForwardAgent
從未被提及存在(除了在註釋行)。
這裏發生了什麼,當我ssh正常:
$ ssh -v [email protected]<server>
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/ulyssecarion/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
-- snip --
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic x86_64)
如果我強迫SSH允許代理轉發與-A
標誌,那麼我就可以得到它的工作:
$ ssh -Av [email protected]<server>
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/ulyssecarion/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
-- snip --
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Requesting authentication agent forwarding. # Note this additional line here
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic x86_64)
(請注意,第二個例子中的日誌有一個額外的線表示代理轉發正在被請求。)
這是正常的,還是我做錯了什麼?提前致謝!
您是否在命令行中使用「rs」作爲主機名?否則,配置塊不適用。 – chepner