2012-12-05 3 views
2

분산 컴퓨팅 자습서를 사용하기 위해 내 localhost에 암호가없는 로그인을 설정하려고합니다. (나는 여러 개의 원격 호스트에 대해 성공적으로 설정했다.) 나는 rsa 키를 생성하고 공개 키를 authorized_keys에 추가하는 일반적인 단계를 밟았지만 여전히 암호를 묻는 메시지가 표시된다. 또한 RSAAuthenticationPubKeyAuthentication/etc/ssh_config에 사용하도록 설정했습니다. 내가 본 다른 제안에 따라 시도해 보았습니다.ssh password-less localhost에 로그인

chmod go-w ~/ 
chmod 700 ~/.ssh 
chmod 600 ~/.ssh/authorized_keys 

그러나 문제는 지속됩니다.

(tutorial)bnels21-2:tutorial bnels21$ ssh -v localhost 
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011 
debug1: Reading configuration data /etc/ssh_config 
debug1: /etc/ssh_config line 20: Applying options for * 
debug1: Connecting to localhost [::1] port 22. 
debug1: Connection established. 
debug1: identity file /Users/bnels21/.ssh/id_rsa type 1 
debug1: identity file /Users/bnels21/.ssh/id_rsa-cert type -1 
debug1: identity file /Users/bnels21/.ssh/id_dsa type -1 
debug1: identity file /Users/bnels21/.ssh/id_dsa-cert type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9 
debug1: match: OpenSSH_5.9 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.9 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug1: kex: client->server aes128-ctr 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: Server host key: RSA 1c:31:0e:56:93:45:dc:f0:77:6c:bd:90:27:3b:c6:43 
debug1: Host 'localhost' is known and matches the RSA host key. 
debug1: Found key in /Users/bnels21/.ssh/known_hosts:11 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: Roaming not allowed by server 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey,keyboard-interactive 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /Users/bnels21/.ssh/id_rsa 
debug1: Authentications that can continue: publickey,keyboard-interactive 
debug1: Offering RSA public key: id_rsa3 
debug1: Authentications that can continue: publickey,keyboard-interactive 
debug1: Trying private key: /Users/bnels21/.ssh/id_dsa 
debug1: Next authentication method: keyboard-interactive 
Password: 

어떤 제안 : 여기

는 ssh를 -v 로컬 호스트의 출력입니까? 나는 OSX 10.8을 돌리고있다.

+1

그리고이 연결 시도에 대한 sshd 서버 로그에는 무엇이 있습니까? –

+0

이것은 /var/log/system.log에서 얻은 것입니다. 12 월 5 일 16:52:04 phyleaux4biologylsuedu.local sshd [54115] : 연결이 닫힙니다 :: 1 [preauth] 12 월 5 일 16:52:06 phyleaux4biologylsuedu .local netbiosd [109] : 이름 서버가 다운 되었습니까? – user1572143

+0

다른 곳에서 sshd 서버 로그를 찾아야합니까? – user1572143

답변

3

여러 개의 키가있는 것 같아 특정 키를 ~/.ssh/config에 지정합니다.

예 :

Host local 
    HostName 127.0.0.1 
    Port 22 
    User your_username 
    IdentityFile ~/.ssh/your_key-id_rsa 

가 그럼 그냥 ssh local하려고합니다.

0

localhost에 연결할 때 프로토콜 버전 2.0을 사용하는 것 같습니다. 따라서 authorized_keysauthorized_keys2으로 옮겨보십시오.

출처 : this post은 두 키 파일의 차이점을 설명합니다.

1

동일한 문제가있었습니다. 시스템 passwd 및 그룹 파일을 검사하여 내 사용자 및 그룹이 존재하지 않음을 발견했습니다. 내가 Cygwin에서 쉘에서이 명령을 실행해야합니다 (내 사용자가 도메인 사용자이었다)이 파일을 만들려면 : 그 후

mkpasswd -l -d > /etc/passwd 

mkgroup -l -d > /etc/group 

를, SSH 잘 작동합니다!

Elvys Borges

관련 문제