老师,有一个问题,我 配置SSH免密登陆,配置完成之后还是需要密码
来源:3-11 Java API操作HDFS文件系统
chenjin5525
2017-08-20
[hadoop@hadoop000 ~]$ cd .ssh
[hadoop@hadoop000 .ssh]$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 9c:35:79:db:e1:27:13:71:96:e2:b6:e1:3c:8e:37:4b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
hadoop@localhost's password:
Last login: Sun Aug 20 16:56:44 2017
[hadoop@hadoop000 ~]$ ssh hadoop000
The authenticity of host 'hadoop000 (192.168.1.104)' can't be established.
ECDSA key fingerprint is 9c:35:79:db:e1:27:13:71:96:e2:b6:e1:3c:8e:37:4b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hadoop000,192.168.1.104' (ECDSA) to the list of known hosts.
hadoop@hadoop000's password:
Last login: Sun Aug 20 16:58:33 2017 from localhost
[hadoop@hadoop000 ~]$ ssh hadoop
ssh: Could not resolve hostname hadoop: Name or service not known
[hadoop@hadoop000 ~]$ ssh hadoop000
hadoop@hadoop000's password:
Permission denied, please try again.
hadoop@hadoop000's password:
2回答
-
chenjin5525
提问者
2017-08-20
重新配置过了,还是一样要输入密码,我发现我里面有一行是(ECDSA),老师的是(RSA)localhost后面跟了ip,我的没有跟ip
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
[hadoop@hadoop000 .ssh]$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 9c:35:79:db:e1:27:13:71:96:e2:b6:e1:3c:8e:37:4b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
hadoop@localhost's password:
Last login: Sun Aug 20 17:39:59 2017
[hadoop@hadoop000 ~]$ exit
登出
Connection to localhost closed.
[hadoop@hadoop000 .ssh]$ ssh hadoop000
The authenticity of host 'hadoop000 (192.168.1.104)' can't be established.
ECDSA key fingerprint is 9c:35:79:db:e1:27:13:71:96:e2:b6:e1:3c:8e:37:4b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hadoop000,192.168.1.104' (ECDSA) to the list of known hosts.
hadoop@hadoop000's password:012017-08-20 -
Michael_PK
2017-08-20
重来一次。先删除.ssh文件,再key..,再拷贝,第一次ssh是需要密码的,第二次之后就不需要了
00
相似问题