Centos7官网qcow2镜像的使用方法


创建云主机使的启动脚本,如下。该脚本使得我们可以从controller节点无密码登陆到云主机

#!/bin/sh
mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.old
cp  /home/centos/.ssh/authorized_keys /root/.ssh/


下面脚本开启密码登陆云主机

#!/bin/sh
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd

你可能感兴趣的:(Centos7官网qcow2镜像的使用方法)