We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb33d7f commit 1bdded2Copy full SHA for 1bdded2
ssh/ssh.sh
@@ -5,6 +5,8 @@
5
##robert yu
6
##centos 6
7
8
+ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa -q -b 2048 -C "[email protected]"
9
+
10
#ssh无密码认证 RSA
11
ssh-keygen -t rsa
12
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
@@ -46,4 +48,4 @@ ssh root@$ip 'service sshd restart'
46
48
hostname=`ssh root@${ip} 'hostname'`
47
49
echo "添加主机名和IP到本地/etc/hosts文件中"
50
echo "$ip $hostname" >> /etc/hosts
-echo "远端主机主机名称为$hostname, 请查看 /etc/hosts 确保该主机名和IP添加到主机列表文件中"
51
+echo "远端主机主机名称为$hostname, 请查看 /etc/hosts 确保该主机名和IP添加到主机列表文件中"
0 commit comments