1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borgserver_ynh.git synced 2024-09-03 20:36:20 +02:00

[fix] Unable to connect with ssh

This commit is contained in:
ljf 2021-07-13 13:44:06 +02:00
parent 176d4e3a02
commit 91ff2ae5cf
3 changed files with 12 additions and 0 deletions

View file

@ -64,6 +64,7 @@ ynh_script_progression --message="Configuring SSH public key for remote connexio
home=/home/$ssh_user
mkdir -p /home/$ssh_user/.ssh
chmod o=--- /home/$ssh_user
chown -R $ssh_user:$ssh_user /home/$ssh_user
touch /home/$ssh_user/.ssh/authorized_keys
extra="--storage-quota $quota"
if [ "$quota" = "" ]; then

View file

@ -47,6 +47,8 @@ ynh_system_user_create --username=$ssh_user --home_dir=/home/$ssh_user --use_she
home=/home/$ssh_user
mkdir -p /home/$ssh_user/.ssh
chmod o=--- /home/$ssh_user
chown -R $ssh_user:$ssh_user /home/$ssh_user
touch /home/$ssh_user/.ssh/authorized_keys
extra="--storage-quota $quota"
if [ "$quota" = "" ]; then

View file

@ -100,6 +100,15 @@ ynh_script_progression --message="Upgrading borgbackup..." --weight=1
install_borg_with_pip
#=================================================
# AUTORIZE SSH FOR THIS USER
#=================================================
ynh_script_progression --message="Seting good permissions..."
mkdir -p /home/$ssh_user/.ssh
chmod o=--- /home/$ssh_user
chown -R $ssh_user:$ssh_user /home/$ssh_user
#=================================================
# AVOID BACKUP OF BACKUP
#=================================================