没有密码的ssh localhost不适用于mac os x 10.9.1

qij5mzcb  于 2021-06-03  发布在  Hadoop
关注(0)|答案(0)|浏览(266)

**结束。**此问题不符合堆栈溢出准则。它目前不接受答案。
**想改进这个问题吗?**更新问题,使其成为堆栈溢出的主题。

5年前关门了。
改进这个问题
我试图在我的mac上安装hadoop,这的一个先决条件是能够在没有密码的情况下ssh到本地主机。以下是我采取的步骤

osxltrsingh:~ rsingh$ rm -rf .ssh/
osxltrsingh:~ rsingh$ sudo systemsetup -setremotelogin on
Password:
setremotelogin: remote login is already On.
osxltrsingh:~ rsingh$ ssh-keygen -t rsa -P ""
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/rsingh/.ssh/id_rsa): 
Created directory '/Users/rsingh/.ssh'.
Your identification has been saved in /Users/rsingh/.ssh/id_rsa.
Your public key has been saved in /Users/rsingh/.ssh/id_rsa.pub.
The key fingerprint is:
5e:24:e9:f7:de:bc:73:29:63:da:8d:f2:00:0b:07:f1 rsingh@osxltrsingh.corp.appdynamics.com
The key's randomart image is:
+--[ RSA 2048]----+
|       .         |
|        o.       |
|       .oE.      |
|       ..o       |
|       .Soo      |
|       .ooo.     |
|        .. ..   .|
|           oo*+..|
|           .*+*= |
+-----------------+
osxltrsingh:~ rsingh$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
osxltrsingh:~ rsingh$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is d2:c2:ed:68:d9:7c:d0:11:de:72:51:ff:49:4f:aa:23.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
Password:

如您所见,它仍然要求输入密码。有什么我不知道的吗。我试图在谷歌上找到问题,但我不知道我做错了什么。非常感谢您的帮助。
ssh的详细输出是

osxltrsingh:~ rsingh$ ssh -v localhost
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 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/rsingh/.ssh/id_rsa type 1
debug1: identity file /Users/rsingh/.ssh/id_rsa-cert type -1
debug1: identity file /Users/rsingh/.ssh/id_dsa type -1
debug1: identity file /Users/rsingh/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com 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 d2:c2:ed:68:d9:7c:d0:11:de:72:51:ff:49:4f:aa:23
debug1: Host 'localhost' is known and matches the RSA host key.
debug1: Found key in /Users/rsingh/.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: 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/rsingh/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /Users/rsingh/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题