Skip to content

Commit

Permalink
fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
umagmrit committed May 19, 2020
1 parent c839577 commit 31fb4f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/zmsshkeygen
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ ssh-keygen -f ${keyfile} -b 2048 -N '' \
-t ${keytype} -C ${zimbra_server_hostname}

# Starting with OpenSSH 7.8 by default, the key is created with the OpenSSH private key format instead of the OpenSSL PEM format.
# Check the format of KEY, and create KEY in OpenSSL PEM format.
# Check the format of KEY and convert to OpenSSL PEM format.
grep "BEGIN OPENSSH PRIVATE KEY" ${keyfile} > /dev/null 2>&1
if [ $? = 0 ]; then
ssh-keygen -m PEM -f ${keyfile} -b 2048 -N '' \ -t ${keytype} -C ${zimbra_server_hostname}
ssh-keygen -p -m PEM -f ${keyfile} -b 2048 -N '' -t ${keytype} -C ${zimbra_server_hostname}
fi
pubkey=`cat ${keyfile}.pub`

Expand Down

0 comments on commit 31fb4f4

Please sign in to comment.