# Ask for root password only once, sshpass will re-use it then often.
stty -echo
-printf "Server root password: "
+printf "(Old) server root password: "
read PW_ROOT
stty echo
printf "\n"
export SSHPASS="${PW_ROOT}"
+# This will be used to log-in as root from plom account.
+echo 'Asking for new root password.'
+ssh root@"${server}" "passwd"
+
# Create user plom, and his ~/.ssh/authorized_keys based on the local
# ~/.ssh/id_rsa.pub; ensure the result has proper permissions and
# ownerships. Then disable root and pw login by copying over the
ssh-add
# This will be used to log-in as root from plom account.
-echo 'Asking for root password.'
+echo 'Asking for new root password.'
ssh root@"${server}" "passwd"
# Set up plom's ~/.ssh/authorized_keys from root's.