Better comment about scp vs. sftp

This commit is contained in:
Emmanuel Engelhart 2024-10-18 18:15:08 +02:00
parent ecd8f988cf
commit d03837b47f
No known key found for this signature in database
GPG Key ID: 120B30D020B553D3
1 changed files with 6 additions and 1 deletions

View File

@ -310,7 +310,10 @@ except ModuleNotFoundError:
else: else:
port = "22" port = "22"
# sending SFTP mkdir command to the sftp interactive mode and not batch (-b) mode # Using SFTP to create the directory hierarchy because we can not
# use SSH (no shell for this user); and then scp to upload the file.
#
# Sending SFTP mkdir command to the SFTP interactive mode and not batch (-b) mode
# as the latter would exit on any mkdir error while it is most likely # as the latter would exit on any mkdir error while it is most likely
# the first parts of the destination is already present and thus can't be created # the first parts of the destination is already present and thus can't be created
sftp_commands = "\n".join( sftp_commands = "\n".join(
@ -321,6 +324,8 @@ except ModuleNotFoundError:
) )
command = [ command = [
"sftp", "sftp",
"-c",
"aes128-ctr",
"-i", "-i",
_environ.get("SSH_KEY"), _environ.get("SSH_KEY"),
"-P", "-P",