Fix ssh keys permissions
parent
d585e992e6
commit
def1544ead
|
@ -45,6 +45,14 @@ done
|
|||
# Copy ssh keys
|
||||
cp /opt/opengnsys/ogrepository/etc/opengnsys $OPENGNSYS_HOME/.ssh/id_ed25519
|
||||
cp /opt/opengnsys/ogrepository/etc/opengnsys.pub $OPENGNSYS_HOME/.ssh/id_ed25519.pub
|
||||
# Change permissions
|
||||
chmod 700 $OPENGNSYS_HOME/.ssh
|
||||
chmod 600 $OPENGNSYS_HOME/.ssh/id_ed25519
|
||||
chmod 644 $OPENGNSYS_HOME/.ssh/id_ed25519.pub
|
||||
# Genera authorized_keys
|
||||
cat $OPENGNSYS_HOME/.ssh/id_ed25519.pub >> $OPENGNSYS_HOME/.ssh/authorized_keys
|
||||
chmod 600 $OPENGNSYS_HOME/.ssh/authorized_keys
|
||||
chown -R opengnsys:opengnsys $OPENGNSYS_HOME/.ssh
|
||||
|
||||
if [ -f /etc/samba/smb.conf ]; then
|
||||
dpkg-divert --package ogrepository --add --rename --divert /etc/samba/smb.conf.orig /etc/samba/smb.conf
|
||||
|
|
Loading…
Reference in New Issue