'mv /tmp/authorized_keys /home/plom/.ssh/'
sshpass -e scp "${local_path_sshd_config}" root@"${server}":"${system_path_sshd_config}"
sshpass -e ssh root@"${server}" 'service ssh restart'
-
# /etc/ssh/sshd_config.
#
# Dependencies: ssh, scp, ~/.ssh/id_rsa.pub, properly configured sshd_config
-# file in misc.sh:local_etc_server$
+# file in misc.sh:$local_etc_server.
set -e
. ./misc.sh
. ../../misc.sh
# Set up SSH config and remove direct SSH login to root.
scp "${local_path_sshd_config}" root@"${server}":"${system_path_sshd_config}"
ssh root@"${server}" 'rm -rf /root/.ssh && service ssh restart'
-
# This will be used to log-in as root from plom account.
printf '\nFirst, enter the old root password; then enter new password three times.\n\n'
-ssh root@"${server}" 'printf "\n" && passwd'
+ssh root@"${server}" 'printf "\n\n" && passwd'
# Save root password for sshpass
stty -echo
# /etc/ssh/sshd_config.
#
# Dependencies: ssh, scp, ~/.ssh/id_rsa.pub, properly configured sshd_config
-# file in misc.sh:$linkable_files_dir
+# file in misc.sh:$local_etc_server.
set -e
. ./misc.sh
. ../../misc.sh
ssh-add
# This will be used to log-in as root from plom account.
-echo 'Asking for new root password.'
-ssh root@"${server}" "passwd"
+printf '\nAsking for new root password.\n\n'
+ssh root@"${server}" 'printf "\n\n" && passwd'
# Set up plom's ~/.ssh/authorized_keys from root's.
ssh root@"${server}" 'useradd -m plom'