IT_컴퓨터_코딩_개발
SSH 연결 시 StrictHostKeyChecking 경고 무시하기
파워유저
2024. 1. 24. 10:52
SSH 연결 시 StrictHostKeyChecking 경고 무시하기
SSH를 사용하여 원격 호스트에 연결할 때, 호스트 키의 유효성을 검사하는 StrictHostKeyChecking 옵션이 사용됩니다. 첫 연결 시 호스트 키가 유효한지 확인하고자 하는데, 때로는 이 검사를 무시하고 싶을 때가 있습니다.
보통 다음과 같은 메시지가 터미널에 표시됩니다:
The authenticity of host 'hostname' can't be established.
ED25519 key fingerprint is SHA256:...
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
이런 경우, 호스트 키 검사를 무시하고자 할 때 -o StrictHostKeyChecking=no 옵션을 사용할 수 있습니다.
ssh -o StrictHostKeyChecking=no -i keyfile user@hostname
사용법
이렇게 StrictHostKeyChecking=no 옵션을 사용하면 호스트 키 검사를 무시하고 연결이 이루어집니다.