Minor modifications, likely to never be used again 😔

This commit is contained in:
Price Hiller 2021-10-06 00:11:46 -05:00
parent ac3ea81f41
commit 1e565a741d

View File

@ -3,22 +3,22 @@
set -e
# Remote System
REMOTE_SSH_SERVER=Home-7980XE
REMOTE_HOST_NAME=gitlab.orion-technologies.io
REMOTE_SSH_SERVER=Kansas-Xeon
REMOTE_HOST_NAME=kansas-xeon.orion-technologies.io
REMOTE_USER_TO_CREATE=Sam
# Local System
SSH_FILE_DIRECTORY=~/.ssh
SSH_FILE_NAME=${REMOTE_USER_TO_CREATE}-id_ed25519
SSH_FILE=${SSH_FILE_DIRECTORY}/${SSH_FILE_NAME}
SSH_HOST=Home-7980XE
SSH_FILE="${SSH_FILE_DIRECTORY}"/"${SSH_FILE_NAME}"
SSH_HOST=Kansas-Xeon
ssh-keygen -b 521 -t ed25519 -f ${SSH_FILE} -N ""
ssh-keygen -b 512 -t ed25519 -f ${SSH_FILE} -N ""
chmod 600 ${SSH_FILE}
PUB_KEY_CONTENTS=$(cat ${SSH_FILE}.pub)
ssh ${REMOTE_SSH_SERVER} /bin/bash << EOF
ssh root@${REMOTE_SSH_SERVER} /bin/bash << EOF
useradd ${REMOTE_USER_TO_CREATE}
mkdir /home/${REMOTE_USER_TO_CREATE}/.ssh
touch /home/${REMOTE_USER_TO_CREATE}/.ssh/authorized_keys
@ -30,9 +30,8 @@ cat << EOF >> ~/.ssh/config
Host ${SSH_HOST}
HostName ${REMOTE_HOST_NAME}
Match user ${REMOTE_USER_TO_CREATE}
Match user ${REMOTE_USER_TO_CREATE} host ${REMOTE_HOST_NAME}
Identityfile ${SSH_FILE}
LogLevel INFO
EOF
ssh ${REMOTE_USER_TO_CREATE}@${SSH_HOST} /bin/bash << EOF