2023년 신상 호텔 리스트
최근에 오픈한 호텔을 찾는다면 살펴보세요

Ubuntu - 비밀번호 접속 막기

조회수: 688

터미널에서 sudo nano /etc/ssh/sshd_config 실행하자.

 

그리고 #PasswordAuthentication을 찾자. 대충 중간 정도에 있다.

# To disable tunneled clear text passwords, change to no here!

#PasswordAuthentication yes

#PermitEmptyPasswords no

 

찾았으면 #PasswordAuthentication를 #을 지우고 no로 변경하자.

Control + X를 누르고 Y를 누르고 엔터 누르면 저장이 된다.

 

마지막으로 sudo systemctl restart ssh 실행하자.

 

혹시나 이렇게 해도 비밀번호 접속이 된다면 또 다른 PasswordAuthentication가 있다면 그것도 no하고 비슷한 것들도 다 no하면 작동할 것이다.