
연결할 때 이 프롬프트를 어떻게 방지/생략/억제할 수 있나요? 스크립트를 통해 서버에 연결해야 하는데 이 시점에서 스크립트가 중지됩니다.
sftp -i /var/id_rsa_test user@host
The authenticity of host '[host]:22 ([xx.xx.xx.xx]:22)' can't be established.
DSA key fingerprint is e1:e2:29:c4:30:9a:8c:de:3f:3d:97:cd:6d:dd:6f:e5.
Are you sure you want to continue connecting (yes/no)?
답변1
해결책을 찾았습니다.. -o StrictHostKeyChecking=no
명령에 추가하세요.
답변2
노력하다
ssh-keyscan host >> ~/.ssh/known_hosts
man ssh-keyscan에 따르면
ssh-keyscan — SSH 공개 키 수집
이 작업은 한 번만 수행해야 합니다.