각기 다른 키 쌍이있는 두 개의 리모컨을 사용하도록 ssh를 구성하려고합니다. 따라서 나는 config
을 만들었습니다.OpenSSH가 잘못된 공개 키를 제공합니까?
UserKnownHostsFile ~/.ssh/known_hosts
Host github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_rsa
Host git.cloudhost.io
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/cloudhost
Github에 연결하면 정상적으로 작동합니다.
> ssh -T github.com
Hi danijar! You've successfully authenticated, but GitHub does not provide shell
access.
하지만 Cloudhost의 경우 연결이 실패합니다.
> ssh -T git.cloudhost.io
Permission denied (publickey,password).
다음은 Cloudhost의 디버그 출력입니다. cloudhost
개인 키 때문에
> ssh -v git.cloudhost.io
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Name/.ssh/config
debug1: Applying options for git.cloudhost.io
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to git.cloudhost.io [31.220.27.160] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Name/.ssh/cloudhost type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.1p1 Debian-4
debug1: match: OpenSSH_6.1p1 Debian-4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'git.cloudhost.io' is known and matches the RSA host key.
debug1: Found key in /c/Users/Name/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: C:\\Users\\Name\\.ssh\\github_rsa
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: C:\\Users\\Name\\.ssh\\github_rsa
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: /c/Users/Name/.ssh/cloudhost
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
라인 Offering public key: /c/Users/Name/.ssh/cloudhost
은 나를 혼란. 공개 키는 cloudhost.pub
입니다.
로그인 사용자로 ssh를 통해 Cloudhost에 어떻게 연결할 수 있습니까? 로그에서
@ AD7six Windows 용 Github를 다시 설치 했으므로 Git을 다시 설치했습니다. 이제'git.cloudhost.io'에 대한 연결이'Permission denied (publickey, password) .'라는 메시지와 함께 실패합니다. 질문이 업데이트됩니다. – danijar
출력은'/ c/Users/Name/.ssh/cloudhost'가 제공되고 거부됨을 나타냅니다. 특히 공개/비공개 언급에 비추어 볼 때 공개 키가 원격 위치에 있지 않은 것처럼 들리므로 cloudhost 키와 연결하는 데 실패합니다. – AD7six
@ AD7six 공용 키가 리모컨에 추가되었는지 다시 한 번 확인했습니다. [this answer] (http://stackoverflow.com/a/8755199/1079110)에 표시된 것처럼'git config --global http.sslVerify false'를 실행하면, 개인 저장소를 복제하고 푸시 할 수 있습니다. Cloudhost 원격. – danijar