✅ 1. WSL에서 SSH 서버 실행
1️⃣ WSL에 SSH 서버 설치 (한 번만 실행)
sudo apt update && sudo apt install openssh-server -y
2️⃣ SSH 설정 파일 수정
code /etc/ssh/sshd_config
vim /etc/ssh/sshd_config
아래 내용 찾아서 수정
#Port 22 → Port 2222 (포트 변경, 이 부분은 필요 시에만 변경) #PasswordAuthentication yes → PasswordAuthentication yes (비밀번호 로그인 허용)
3️⃣ SSH 서비스 시작 및 활성화
서비스 시작 및 활성화
sudo service ssh start
상태 확인(running이면 정상)
sudo service ssh status
매번 부팅 할 때 마다 자동으로 실행
sudo systemctl enable ssh
✅ 2. WSL IP 주소 확인
WSL 접속 후 아래 명령어 실행
hostname -I
출력 예시:
172.18.64.1
위 IP주소가 WSL의 로컬 IP주소입니다.
✅ 3. Windows Intellij에서 ssh로 접속
1️⃣ Intellij 메인 프로젝트 화면에서 좌측 Remote Development에서 SSH 선택 -> New Project 혹은 Connect to Host
(프로젝트가 이미 열린 상태에서 이 화면을 띄우려면 File -> Close Project로 갈 수 있음)
2️⃣ Connection -> Open Settings
3️⃣ 왼쪽 위 + 버튼 (add)
4️⃣ SSH 호스트 설정
5️⃣ Check Connection and Continue
6️⃣ git clone한 레포지토리를 Project Directory로 선택 후 Start IDE and Connect
There was an error while loading. Please reload this page.