112 | | * Hadoop will use ssh connections for internal connection, thus we have to do SSH key exchange. |
113 | | {{{ |
114 | | $ ssh-keygen |
115 | | $ cp .ssh/id_rsa.pub .ssh/authorized_keys |
| 112 | |
| 113 | * 編寫 /etc/ssh/ssh_config |
| 114 | {{{ |
| 115 | StrictHostKeyChecking no |
| 116 | }}} |
| 117 | |
| 118 | |
| 119 | * 執行 |
| 120 | {{{ |
| 121 | $ ssh-keygen -t rsa -b 1024 -N "" -f ~/.ssh/id_rsa |
| 122 | $ cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys |
| 123 | }}} |
| 124 | |
| 125 | * 寫個自動化 auto.shell 並執行 |
| 126 | {{{ |
| 127 | #!/bin/bash |
| 128 | |
| 129 | for ((i=1;i<=16;i++)); |
| 130 | do |
| 131 | scp scp -r ~/.ssh/ "192.168.1.$i":~/ |
| 132 | scp /etc/ssh/ssh_config "192.168.1.$i":/etc/ssh/ssh_config |
| 133 | ssh "192.168.1.$i" /etc/init.d/ssh restart |
| 134 | done |
| 135 | }}} |
| 136 | |
| 137 | * 正確無誤則可免密碼登入 |
| 138 | |
| 139 | === dsh === |
| 140 | {{{ |