RPM - Pubkey & Update

by mgirouard
2 deployments · 2 still active · last rev. 4 years ago

Installs a given key in root's home directory so you can hand off the rest of the provisioning process to something else.

Compatible with: CentOS 7
# <UDF name="pub_key" label="Your public SSH key" example="ssh-rsa F00BA4BA5 foo@bar.baz (mbp)">

# Install the given key
mkdir /root/.ssh
chmod 700 /root/.ssh
echo "$PUB_KEY" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys

# Get up to date
yum update -y