ssh ProxyCommand 중계 접속

post-thumbnail

ssh 점프 호스트 접속

  • 아래와 같은 상황일 때 config 설정 방법
     +-------+       +----------+      +-----------+
     | Laptop|  -->  | Jumphost |  --> | FooServer |
     +-------+       +----------+      +-----------+
  • vi .ssh/config : config 파일 수정
  • proxcycommand 설정
Host jumphost
    HostName gpu.jumphost.ai
    Port 5501
    User Username
    IdentityFile ~/.ssh/id_rsa

Host fooserver
    HostName gpu.fooserver.ai
    IdentityFile ~/.ssh/id_rsa
    ProxyCommand ssh jomphost -W %h:%p

출처 : https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/

profile
나 응애👶 개발자, 딥린이👨‍💻, 언어 연구자 👨‍🎓

0개의 댓글