Skip to content

Commit

Permalink
Add Server key fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
Wasapl committed Mar 29, 2018
1 parent 4567810 commit 219941d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/enable-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
USER_NAME=appveyor
LOCK_FILE="${HOME}/build.lock"
USERKEY="${HOME}/.ssh/userkey"
HOSTKEY=/etc/ssh/ssh_host_ecdsa_key.pub

YELLOW='\033[0;33m'
NC='\033[0m'
Expand Down Expand Up @@ -39,8 +40,14 @@ if [[ -n "${USERKEY_MD5}" ]]; then
echo " ${USERKEY_SHA256}"
echo " ${USERKEY_MD5}"
fi
if [[ -f "${HOSTKEY}" ]]; then
echo ""
echo "Server host key fingerprint:"
HOSTKEY_SHA256=$(ssh-keygen -lf ${HOSTKEY} | cut -f 2 -d" ")
echo " ${HOSTKEY_SHA256}"
fi

if [[ -n "$APPVEYOR_SSH_BLOCK" ]] && $APPVEYOR_SSH_BLOCK; then
if [[ -n "${APPVEYOR_SSH_BLOCK}" ]] && ${APPVEYOR_SSH_BLOCK}; then
# create $HOME/build.lock file if we need to block build process.
touch "${LOCK_FILE}"
# wait until $HOME/build.lock deleted by user.
Expand Down

0 comments on commit 219941d

Please sign in to comment.