(Vagrant) SSH 연결시 발생하는 Permission denied (publickey,gssapi-keyex,gssapi-with-mic) 오류 대응
2967 단어 VirtualBoxWindows리눅스SSHteraterm
소개
이 기사에서는 Windows10(1909), Oracle VirtualBox 6.0 + Vagrant 2.2.6의 환경에서 시작한 CentOS 8에서 직면한 SSH 연결에 관한 내 문제 슛을 기록한 것입니다.
직면한 일
VirtualBox에서 시작한 CentOS에 대해 TeraTerm을 사용하여 SSH를 시도했을 때 일반 암호로 액세스 할 수 없었습니다.
SSH 액세스 로그 확인
SSH 액세스시 로그를 출력하기 위해 PowerShell에서 -vvv 옵션을 사용하여 연결을 시도하십시오.
ssh -vvv [email protected]
다음과 같은 로그 확인 (일부 발췌)
PS C:\Vagrant\centos8> ssh -vvv [email protected]
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/localadmin/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.33.10 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.33.10 [192.168.33.10] port 22.
debug1: Connection established.
debug3: Failed to open file:C:/Users/localadmin/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/localadmin/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
.
.
.
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_rsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_rsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_dsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_ecdsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_ed25519
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_xmss
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
분명히 인증을위한 키를 볼 수없는 패턴
해결된 방법
ssh가 참조하려고했는데 C:\\Users\\localadmin/.ssh/
에는 RSA 키가 존재하지 않고 접속을 할 수 없었다.
따라서 TeraTerm의 새로운 연결 화면에서 다음 절차를 수행하면 연결할 수 있습니다.
VirtualBox에서 시작한 CentOS에 대해 TeraTerm을 사용하여 SSH를 시도했을 때 일반 암호로 액세스 할 수 없었습니다.
SSH 액세스 로그 확인
SSH 액세스시 로그를 출력하기 위해 PowerShell에서 -vvv 옵션을 사용하여 연결을 시도하십시오.
ssh -vvv [email protected]
다음과 같은 로그 확인 (일부 발췌)
PS C:\Vagrant\centos8> ssh -vvv [email protected]
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/localadmin/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.33.10 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.33.10 [192.168.33.10] port 22.
debug1: Connection established.
debug3: Failed to open file:C:/Users/localadmin/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/localadmin/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
.
.
.
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_rsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_rsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_dsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_ecdsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_ed25519
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_xmss
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
분명히 인증을위한 키를 볼 수없는 패턴
해결된 방법
ssh가 참조하려고했는데 C:\\Users\\localadmin/.ssh/
에는 RSA 키가 존재하지 않고 접속을 할 수 없었다.
따라서 TeraTerm의 새로운 연결 화면에서 다음 절차를 수행하면 연결할 수 있습니다.
PS C:\Vagrant\centos8> ssh -vvv [email protected]
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/localadmin/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.33.10 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.33.10 [192.168.33.10] port 22.
debug1: Connection established.
debug3: Failed to open file:C:/Users/localadmin/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/localadmin/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
.
.
.
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_rsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_rsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_dsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_ecdsa
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_ed25519
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: C:\\Users\\localadmin/.ssh/id_xmss
debug3: no such identity: C:\\Users\\localadmin/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
ssh가 참조하려고했는데
C:\\Users\\localadmin/.ssh/
에는 RSA 키가 존재하지 않고 접속을 할 수 없었다.따라서 TeraTerm의 새로운 연결 화면에서 다음 절차를 수행하면 연결할 수 있습니다.
Vagrantのホームフォルダ\ホストのフォルダ\.vagrant\machines\default\virtualbox
부하에 "id_rsa"파일이 존재했기 때문에 그것을 지정 Reference
이 문제에 관하여((Vagrant) SSH 연결시 발생하는 Permission denied (publickey,gssapi-keyex,gssapi-with-mic) 오류 대응), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/tatsuya_koizumi/items/8c9e8b3432279b2c6461텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)