问题原文
原帖链接 · Amelio Vazquez-Reina · CC BY-SA 3.0
Let's say I have the following setup:
ssh ssh
A ------> B ------> C
^ ^
using A's using B's
key key
I'm trying to configure this in .ssh/config in the host A as follows:
Host C
HostName C.com
IdentityFile path_to_key_1
ProxyCommand ssh -i path_to_key_2 B -W %h:%p
Which identify file and path go into path_to_key_1 and path_to_key_2 ?
For example, does path_to_key_1 refer to a path in A and path_to_key_2 to a path in B? Or are they both supposed to be paths in A?
已采纳解答
原帖链接 · Zoredache · CC BY-SA 3.0
The ProxyCommand is executed from 'A', this makes a connection to B that only creates a tunnel to 'C' which is then used for 'A' to connect to 'C'. At no point is a shell opened on B, or any ssh keys loaded from B.
If you require a key for authentication that only lives on 'B' to authenticate to 'C' you won't be able to use the 'ProxyCommand'.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
