집에서 회사에 있는 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에 접근해서 코딩할 수 있다.

2
0

If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/0195aefb-6143-7825-8dd2-3e5119bc97c2 on your instance and quote it. (Note that quoting is not supported in Mastodon.)