집에서 회사에 있는 WSL에 SSH로 접근하려고 삽질을 좀 했는데 결론만 적는다. 우선 구성은 다음 그림과 같다.

G macOS macOS Windows Windows macOS->Windows VPN WSL WSL Windows->WSL

이때 다음과 같이 하면 macOS에서 WSL에 SSH로 접근이 가능하다.

  • Windows에 SSH 서버 필요 없음
  • Windows에 netsh interface portproxy 명령어로 포트 프록시 이용
  • WSL에서 sshd_config 파일에 GatewayPorts yes 설정 필요

그리고 macOS의 Visual Studio Code에서 Remote - SSH 플러그인을 이용하면 macOS에서 쾌적하게(?) 회사 WSL에 접근해서 코딩할 수 있다.

1
0

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0195af05-3b5a-7619-87cd-6fb89e74412d on your instance and reply to it.

@hongminhee洪 民憙 (Hong Minhee) Tailscale을 쓰면 회사 VPN을 따로 안 켜도 되겠네요⋯

0
0