+-----------------+
Created directory '/home/hadoopusr/.ssh'. Your identification has been saved in /home/hadoopusr/.ssh/id_rsa. Your public key has been saved in /home/hadoopusr/.ssh/id_rsa.pub. The key fingerprint is: d4:29:00:6e:20:f0:d9:c6:a2:9b:cd:22:60:44:af:eb hadoopusr@shan-pc The key's randomart image is: +--[ RSA 2048]----+ |+.. ... | |.o.* . . . | | .+.* o o | |...+ . . | |oo S | |o=. | |=.o | |o. | | E | +-----------------+(注:回车后会在~/.ssh/下生成两个文件:id_rsa和id_rsa.pub。这两个文件是成对出现的。)
2、进入~/.ssh/目录下,将id_rsa.pub追加到authorized_keys授权文件中,开始没有authorized_keys文件。执行命令:
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
完成后即可无密码登录本机。
3、登录localhost。在终端输入命令:ssh localhost
(注:当ssh远程登录到其它机器后,你控制的是远程的机器,需要执行退出命令才能重新控制本地主机。)
4、执行退出命令。输入命令:exit
相关阅读:
Ubuntu 12.10 +Hadoop 1.2.1版本集群配置
搭建Hadoop环境(在Winodws环境下用虚拟机虚拟两个Ubuntu系统进行搭建)