allow sftp
This commit is contained in:
parent
73e31ca37c
commit
c181069544
3 changed files with 11 additions and 3 deletions
|
|
@ -51,11 +51,19 @@ in
|
|||
|
||||
};
|
||||
|
||||
services.openssh.sftpServerExecutable = "internal-sftp";
|
||||
services.openssh.extraConfig = ''
|
||||
Match User picardbackup
|
||||
ChrootDirectory ${config.users.users.picardbackup.home}
|
||||
ForceCommand internal-sftp
|
||||
AllowTcpForwarding no
|
||||
'';
|
||||
|
||||
# Backup Target
|
||||
users.users.picardbackup = {
|
||||
createHome = true;
|
||||
group = "users";
|
||||
home = "/backups/picard";
|
||||
home = "/backups/restic/picard";
|
||||
isSystemUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHvCF8KGgpF9O8Q7k+JXqZ5eMeEeTaMhCIk/2ZFOzXL0"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
"--keep-yearly 75"
|
||||
];
|
||||
initialize = true;
|
||||
repository = "sftp:ds9:/backups/picard/restic";
|
||||
repository = "sftp:picardbackup@ds9:/restic";
|
||||
paths = [
|
||||
"/persistent"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ in
|
|||
security.sudo.execWheelOnly = true;
|
||||
services.openssh = {
|
||||
passwordAuthentication = false;
|
||||
allowSFTP = false; # just use rsync, lol
|
||||
allowSFTP = true; # just use rsync, lol
|
||||
kbdInteractiveAuthentication = false;
|
||||
extraConfig = ''
|
||||
AllowTcpForwarding yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue