Skip to content

Commit 1bdded2

Browse files
committed
update
1 parent cb33d7f commit 1bdded2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ssh/ssh.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
##robert yu
66
##centos 6
77

8+
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa -q -b 2048 -C "[email protected]"
9+
810
#ssh无密码认证 RSA
911
ssh-keygen -t rsa
1012
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
@@ -46,4 +48,4 @@ ssh root@$ip 'service sshd restart'
4648
hostname=`ssh root@${ip} 'hostname'`
4749
echo "添加主机名和IP到本地/etc/hosts文件中"
4850
echo "$ip $hostname" >> /etc/hosts
49-
echo "远端主机主机名称为$hostname, 请查看 /etc/hosts 确保该主机名和IP添加到主机列表文件中"
51+
echo "远端主机主机名称为$hostname, 请查看 /etc/hosts 确保该主机名和IP添加到主机列表文件中"

0 commit comments

Comments
 (0)