WSL Putty 로 접속하기

By | 2021년 8월 22일
Table of Contents

WSL Putty 로 접속하기

참조

목표

도스창 대신 Putty 를 이용해 Windows WSL 에 접속합니다.

ssh 서버 실행하기

그냥 ssh 서버를 실행하면 hostkey 가 없다면서 종료합니다.

sudo service ssh start
 * Starting OpenBSD Secure Shell server sshd
sshd: no hostkeys available -- exiting.

아래 명령으로 키를 생성해 줍니다.

sudo ssh-keygen -A

ssh 서버를 실행하면 정상적으로 실행됩니다.

sudo service ssh start
sudo systemctl enable ssh.service

Putty 로 접속하기

sudo vi /etc/ssh/sshd_config

위 명령 실행 후 PasswordAuthentication 가 no 로 되어 있는것을 yes 로 변경해 줍니다.

sudo service ssh restart

ubuntu@localhost 로 접속하면 정상적으로 접속됩니다.

ubuntu 는 WSL 설치시 설정했던 자신의 아이디입니다.

결론

WSL 은 않좋다…

답글 남기기