91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Hadoop用戶配置ssh免密登錄

發布時間:2020-06-16 06:58:18 來源:網絡 閱讀:19203 作者:wangkunj 欄目:大數據

一般生產環境 Hadoop組件都是由hadoop用戶來啟動,首先需要配置hadoop用戶ssh免密登錄

1.創建Hadoop用戶
[root@hadoop000 ~]# useradd hadoop
[root@hadoop000 ~]# id hadoop
uid=1102(hadoop) gid=1102(hadoop) groups=1102(hadoop)
[root@hadoop000 ~]# passwd hadoop
Changing password for user hadoop.
New password: 
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.
#給hadoop sudo權限
[root@hadoop000 ~]# vi /etc/sudoers
hadoop ALL=(root) NOPASSWD:ALL
2.切換到hadoop用戶 配置免密登錄
[root@hadoop000 ~]# su - hadoop
#確保有ssh服務
[hadoop@hadoop000 ~]$ sudo service sshd status
openssh-daemon (pid  24823) is running...
[hadoop@hadoop000 ~]$ ssh-keygen
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: 
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:
bd:75:87:ca:44:2d:1f:de:b7:5e:a0:96:ac:b3:7e:01 hadoop@hadoop000
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|             .   |
|            o o  |
|         .E. + + |
|        S ..o * +|
|           *.= oo|
|          . B. ..|
|          .o. . .|
|         .++   . |
+-----------------+
[hadoop@hadoop000 ~]$ cd .ssh
[hadoop@hadoop000 .ssh]$ ll
total 8
-rw------- 1 hadoop hadoop 1675 May 17 14:59 id_rsa
-rw-r--r-- 1 hadoop hadoop  395 May 17 14:59 id_rsa.pub
[hadoop@hadoop000 .ssh]$ cat id_rsa.pub >> authorized_keys
[hadoop@hadoop000 .ssh]$ ll
total 12
-rw-rw-r-- 1 hadoop hadoop  395 May 17 14:59 authorized_keys
-rw------- 1 hadoop hadoop 1675 May 17 14:59 id_rsa
-rw-r--r-- 1 hadoop hadoop  395 May 17 14:59 id_rsa.pub
#authorized_keys權限必須為600
[hadoop@hadoop000 .ssh]$ chmod 600 authorized_keys
[hadoop@hadoop000 .ssh]$ ssh hadoop000 date
The authenticity of host 'hadoop000 (192.168.6.217)' can't be established.
RSA key fingerprint is 25:d9:d6:7e:fa:e0:a7:92:7c:06:76:5c:2b:19:bf:a3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hadoop000,192.168.6.217' (RSA) to the list of known hosts.
Thu May 17 15:00:28 CST 2018
[hadoop@hadoop000 .ssh]$ ssh hadoop000 date
Thu May 17 15:00:30 CST 2018
3.總結

hadoop用戶配置ssh免密登錄 authorized_keys權限必須改為600

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

岳池县| 莎车县| 南皮县| SHOW| 南郑县| 胶州市| 出国| 大悟县| 奈曼旗| 翁源县| 晴隆县| 黑河市| 蒙阴县| 年辖:市辖区| 开阳县| 崇礼县| 泌阳县| 汝阳县| 东莞市| 佛冈县| 平邑县| 新田县| 治县。| 西乡县| 襄城县| 武宁县| 广德县| 平遥县| 怀来县| 泌阳县| 高邑县| 贵定县| 石楼县| 合川市| 玛曲县| 应城市| 布尔津县| 拉孜县| 左云县| 德格县| 句容市|