ProxyCommand?로 다음 명령을 어떻게 다시 쓸 수 있습니까?
ssh -l username1 -t jumphost1 \
ssh -l username2 -t jumphost2 \
ssh -l username3 -t jumphost3 \
ssh -l username4 server
작동하지 않습니다
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 by remote host
와 함께 사용하는 것을 알고 nc있지만 3 + 홉과 함께 사용하는 방법을 찾고 있으며이 옵션을와 함께 사용합니다 scp. ssh_config맨 페이지를 확인 했지만 정보가 매우 부족합니다.
편집하다
아래 제안 된대로 ProxyCommand다른 중첩 된 것을 사용하려고 ProxyCommand했지만 항상 다음 줄을 따라 무언가를 얻습니다.
debug3: ssh_init_stdio_forwarding: 192.17.2.2:2222
debug1: channel_connect_stdio_fwd 192.17.2.2:2222
debug1: channel 0: new [stdio-forward]
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: getpeername failed: Bad file descriptor
debug3: send packet: type 90
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
다행히도 키 설정을 해결해야하지만 , 그 이후로 7.3 -J또는 그 ProxyJump목적을 달성했습니다.
ssh -q -J user1@jumphost1,user2@jumphost2,user3@jumphost3 user@server