如何用 重写以下命令ProxyCommand
?
ssh -l username1 -t jumphost1 \
ssh -l username2 -t jumphost2 \
ssh -l username3 -t jumphost3 \
ssh -l username4 server
Run Code Online (Sandbox Code Playgroud)
这不起作用
ssh -o ProxyCommand="\
ssh -l username1 -t jumphost1 \
ssh -l username2 -t jumphost2 \
ssh -l username3 -t jumphost3" \
-l username4 server
username1@jumphost1's password:
Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
ssh_exchange_identification: Connection closed …
Run Code Online (Sandbox Code Playgroud) 该问题描述了如何通过 SSH 连接到只能通过一个或多个主机(也可以通过 SSH 连接)访问的机器。
有等效的使用方法scp
吗?也就是说,将文件从远程机器复制到我的本地机器(假设我对所有机器都有密码或密钥访问权限)?