emrhssla
612
2022-04-09 16:30:39 작성 2022-04-09 20:36:48 수정됨
2
399

[초보주의] SSH 접속이 안됩니다 ㅜ


접속하려하면 자꾸 Host Key verification failed가 떠서 관련파일 다삭제하고 keygen을 했는데도 아래와 같이뜹니다..

조사해보니 Host Key verification failed 는 ssh-keygen을 사용하라는데 host파일안에는 해당 아이피가 없다고 뜨고ㅜㅜ


~/st/k/vagrant_home/k8s > rm ~/.ssh/id_rsa                                  

~/st/k/vagrant_home/k8s > rm ~/.ssh/id_rsa.pub                              

~/st/k/vagrant_home/k8s > rm ~/.ssh/known_hosts                             

~/st/k/vagrant_home/k8s > ssh-keygen  

~/st/k/vagrant_home/k8s > touch ~/.ssh/known_hosts 


~/st/k/vagrant_home/k8s > ssh vagrant@192.168.56.11                         % at 16:05:53

The authenticity of host '192.168.56.11 (192.168.56.11)' can't be established.

ED25519 key fingerprint is SHA256:7CsGnOc7sE75po4OmQXd7wrw7Tmoa+jQbpH6sGXy8gE.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? 

Host key verification failed.

~/st/k/vagrant_home/k8s > ssh-keygen -R 192.168.56.11                       % at 16:15:20

Host 192.168.56.11 not found in /Users/gimchan-yeong/.ssh/known_hosts


~/st/k/vagrant_home/k8s > ls -al ~/.ssh                                           % at 16:31:19

total 40

drwx------    8 gimchan-yeong  staff   256 Apr  9 16:15 .

drwxr-xr-x+ 115 gimchan-yeong  staff  3680 Apr  9 16:31 ..

-rw-r--r--@   1 gimchan-yeong  staff  1674 Apr  1 18:07 chan.pem

-rw-r--r--    1 gimchan-yeong  staff   381 Apr  1 18:17 chan2.pem

-rw-r--r--    1 gimchan-yeong  staff   381 Apr  1 18:31 chankey.pem

-rw-------    1 gimchan-yeong  staff  2643 Apr  9 16:23 id_rsa

-rw-r--r--    1 gimchan-yeong  staff   601 Apr  9 16:23 id_rsa.pub

-rw-r--r--    1 gimchan-yeong  staff     0 Apr  9 16:15 known_hosts

~/st/k/vagrant_home/k8s > ssh-copy-id vagrant@192.168.56.11

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/gimchan-yeong/.ssh/id_rsa.pub"

The authenticity of host '192.168.56.11 (192.168.56.11)' can't be established.

ED25519 key fingerprint is SHA256:7CsGnOc7sE75po4OmQXd7wrw7Tmoa+jQbpH6sGXy8gE.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? 

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

The authenticity of host '192.168.56.11 (192.168.56.11)' can't be established.

ED25519 key fingerprint is SHA256:7CsGnOc7sE75po4OmQXd7wrw7Tmoa+jQbpH6sGXy8gE.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? 


/usr/bin/ssh-copy-id: ERROR: Host key verification failed.

0
  • 답변 2

  • 쿠잉
    5k
    2022-04-09 18:26:36

    키생성 후에 공개키를 접속하시려는곳에 등록한게 맞나요?

  • emrhssla
    612
    2022-04-09 20:10:54

    192.168.56.11 호스트 내에 등록했냐는 말씀이신가요?

  • 로그인을 하시면 답변을 등록할 수 있습니다.