|
|
@ -63,9 +63,12 @@ EOF |
|
|
|
lxc exec "$CONTAINER" -- mkdir -p "/home/$SSH_USER/.ssh" |
|
|
|
lxc exec "$CONTAINER" -- chown "$SSH_USER:$SSH_USER" "/home/$SSH_USER/.ssh" |
|
|
|
lxc exec "$CONTAINER" -- chmod 760 "/home/$SSH_USER/.ssh" |
|
|
|
lxc file push --uid 0 --gid 0 "/home/$miaou_user/.ssh/id_ed25519.pub" "$CONTAINER/home/$SSH_USER/.ssh/authorized_keys" &>/dev/null |
|
|
|
lxc exec "$CONTAINER" -- chown "$SSH_USER:$SSH_USER" "/home/$SSH_USER/.ssh/authorized_keys" |
|
|
|
lxc exec "$CONTAINER" -- chmod 600 "/home/$SSH_USER/.ssh/authorized_keys" |
|
|
|
|
|
|
|
if [[ -f "/home/$miaou_user/.ssh/authorized_keys" ]]; then |
|
|
|
lxc file push --uid 0 --gid 0 "/home/$miaou_user/.ssh/authorized_keys" "$CONTAINER/home/$SSH_USER/.ssh/authorized_keys" &>/dev/null |
|
|
|
lxc exec "$CONTAINER" -- chown "$SSH_USER:$SSH_USER" "/home/$SSH_USER/.ssh/authorized_keys" |
|
|
|
lxc exec "$CONTAINER" -- chmod 600 "/home/$SSH_USER/.ssh/authorized_keys" |
|
|
|
fi |
|
|
|
|
|
|
|
echo "create symbolic link for curl from TOOLBOX as required for Codium remote-ssh" |
|
|
|
lxc exec "$CONTAINER" -- ln -sf /TOOLBOX/curl /usr/bin/ |
|
|
|