티스토리 뷰

IT/Unix/Linux

CentOS 7.4 Public Key 인증 설정

래빗조아 2020. 2. 25. 11:00
반응형

CentOS 7.4 기본 설정에서 public key 배포후 인증 로그인이 되지 않아서 두 가지 작업이 필요하다.

/etc/ssh/sshd_config 설정

[root@localhost ~]$ more /etc/redhat-release

CentOS Linux release 7.4.1708 (Core)

[root@localhost ~]$ vi /etc/ssh/sshd_config

PubkeyAuthentication yes

[root@localhost ~]# service sshd restart

Redirecting to /bin/systemctl restart sshd.service

디렉터리 및 파일 permission

[naru@localhost ~]$ chmod 700 .ssh/

[naru@localhost ~]$ chmod 600 .ssh/authorized_keys

 

 

반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함
반응형