CloudInit CentOS 7 - Script to allow SSH PW login.

p.lakis

New Member
Jul 11, 2018
23
0
1
38
Here is a little script to build out a CentOS 7.4 minimal image to be cloud-init compatible and allow SSH via text password.
Obviously at your own risk, This is for testing purposes.
https://raw.githubusercontent.com/philliplakis/centos7-cloudinit/master/cloudinit.sh

Code:
#!/bin/bash

echo "********************************************************************************"
echo ""
echo "Installing Cloud-Init."
echo ""
echo "********************************************************************************"

yum -y install cloud-init
sleep 5

echo "********************************************************************************"
echo ""
echo "Allowing SSH PW Login"
echo ""
echo "********************************************************************************"

cd /etc/cloud/

sed -i '/ssh_pwauth:   0/c\ssh_pwauth:   1' cloud.cfg

echo "********************************************************************************"
echo ""
echo "Done!"
echo ""
echo "Add Cloudinit drive in GUI + Convert to template!"
echo ""
echo "********************************************************************************"
sleep 5
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!