본문 바로가기
Server/Linux

[linux]sshd 실행 불가 Failed to start OpenSSH server daemon Unable to load host key:..

by 얽디 2024. 6. 19.

서버 ssh 원격 접속이 되지 않고 로컬 확인 시 ssh 제몬 실행이 되지않아 

/var/log/message 로그 확인 시 아래처럼 에러가 발생하고 있었다.

 

Unable to load host key: /etc/ssh/ssh_host_rsa_key

Unable to load host key: /etc/ssh/ssh_host_ecdsa_key

Unable to load host key: /etc/ssh/ssh_host_ed25519_key

...

..

Faild to start OpenSSH server daemon.

 

 

방법

# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key 
엔터엔터엔터
--> 키값생성

# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
엔터엔터엔터
--< 키값 생성

# systemctl restart sshd
데몬재실행

# netstat -nltp //22 sshd 포트 올라와있는지 확인

접속 확인

 

잘댄다 끗

리부팅하고 잘되는지도 봐보자

댓글