????Hadoop?汾?1.2.1
????Linux???Fedora19?????hadoop?????
???????????????ssh????????饗????α???????Hadoop????????SSH????????

 

[hadoop@promote ~]$ which ssh
/usr/bin/ssh
[hadoop@promote ~]$ which ssh-keygen
/usr/bin/ssh-keygen
[hadoop@promote ~]$ which sshd
/usr/sbin/sshd
[hadoop@promote ~]$ ssh-keygen -t rsa

????????·???

 

Generating public/private rsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_rsa):
Created directory '/home/hadoop/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match.  Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/hadoop/.ssh/id_rsa.
Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub.
The key fingerprint is:
2f:a9:60:c7:dc:38:8f:c7:bb:70:de:d4:39:c3:39:87 hadoop@promote.cache-dns.local
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|                 |
|        S        |
|     o o o o +   |
|    o B.= o E .  |
|   . o Oo+   =   |
|      o.=o.      |
+-----------------+

?????????/home/hadoop/.ssh/·??????????id_rsa????id_rsa.pub
????[hadoop@promote .ssh]$ cd /home/hadoop/.ssh/
????[hadoop@promote .ssh]$ ls
????id_rsa  id_rsa.pub
???????sshd?????????????
????[hadoop@promote .ssh]$ su root
????????
????[root@promote .ssh]# vi /etc/ssh/sshd_config
????????RSA??????????????????#???

 

RSAAuthentication yes
PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile      .ssh/authorized_keys