Explicitly set permissions on user and host keys.

On cygwin, the umask might not be sufficient.  Should fix tests on
Github runners.
This commit is contained in:
Darren Tucker 2023-02-24 13:44:13 +11:00
parent 6c9fc9d7a9
commit 0c5d4c843d
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -674,6 +674,9 @@ for t in ${SSH_HOSTKEY_TYPES}; do
# don't use SUDO for proxy connect
echo HostKey $OBJ/$t >> $OBJ/sshd_proxy
# explicitly set perms since cygwin inhertited perms might be too open
chmod 600 $OBJ/$t $OBJ/host.$t
done
chmod 644 $OBJ/authorized_keys_$USER