티스토리 뷰
Linux
userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]
CHOMAN 2020. 6. 23. 17:27참고 원문
https://lists.centos.org/pipermail/centos/2019-October/173932.html
https://www.madboa.com/blog/2019/11/14/el8-crypto-policy/
http://www.openssh.com/legacy.html
/var/log/secure 로그 메세지
Jun 23 17:06:45 DB1 sshd[1454]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]
증상 발견 및 원인?
두 서버간 트러스트 관계를 만들어 scp 를 명령어를 통해 암호 없이 파일 전송하고자 함
Centos6 (openssh-clients-5.3p1-84.1.el6.x86_64) -> Centos8 (openssh-server-8.0p1-4.el8_1.x86_64) 간 발생
Centos6 (openssh-clients-5.3p1-84.1.el6.x86_64) -> Centos7 (openssh-server-7.4p1-21.el7.x86_64) 간 문제없음
openssh 7.X 이상에서 ssh-dss 키교환 설정이 disable 되어서 그렇다고 함?
ssh -vvv 디버그 모드로 테스트 (클라이언트쪽에서 자세한 확인 가능함)
해결1
ssh-keygen -t rsa
centos6 복사하는쪽 (원본) RSA 로 키 생성하여 설정하거나
해결2 (이 방법이 간단)
/usr/share/crypto-policies/DEFAULT/opensshserver.txt
아래 구문 찾기
-oPubkeyAcceptedKeyTypes=rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com
아래와 같이 변경 (마지막에 ,ssh-dss 추가)
-oPubkeyAcceptedKeyTypes=rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-dss
service sshd restart (재시작 필요)
centos8 복사받는쪽 (복사본) 위 파일 수정하면 됨
'Linux' 카테고리의 다른 글
dd 진행상황 모니터링 (0) | 2020.08.20 |
---|---|
장치에 남은 공간이 없음 (No space left on device) (0) | 2020.08.07 |
zabbix5 텔레그램 알람 받기 (0) | 2020.06.17 |
ssh 느림 (0) | 2020.06.09 |
Linux 파일 만든날짜 (생성일시) (0) | 2020.05.26 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- iptables
- IPSEC
- cURL
- OpenVPN
- HAProxy
- glusterfs
- centOS7
- galera
- virtualbox
- L2TP
- WAF
- ntp
- Apache
- SSL
- yum
- MySQL
- kvm
- softether
- pptp
- 리눅스
- gitlab
- ssh
- 베이어다이나믹
- mod_security
- php
- centos8
- 인증서
- NGINX
- GeoIP
- mariadb
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함