I am starting work for an organization on their server. They need to allow connections from my server in order to use GIT over SSH.
They asked me to place this in my SSH directory:
SHORTNAME=abcdef
FULLNAME=12.34.56.789
PORT=9999
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa_${SHORTNAME}
cat <<EOF >> ~/.ssh/config
host ${SHORTNAME}
hostname ${FULLNAME}
port ${PORT}
identityfile ~/.ssh/id_rsa_${SHORTNAME}
compression yes
protocol 2
ServerAliveInterval 60
EOF
ssh ${SHORTNAME} "mkdir -p ~/.ssh"
scp -P ${PORT} ~/.ssh/id_rsa_${SHORTNAME}.pub ${FULLNAME}:~/.ssh/id_rsa_${SHORTNAME}.pub
ssh ${SHORTNAME} "cat ~/.ssh/id_rsa_${SHORTNAME}.pub >> ~/.ssh/authorized_keys"
I am a Linux beginner. I just want to ensure that running this in SSH won't allow them access to my server. We're trying to achieve a solution where my server is allowed to connect to their server for push and pull requests via GIT over SSH. Is this safe to do? Or is there a better solution to accomplish this task?