I can do
sftp server.com <<< """put bar.txt bar.txt"""
using my config in ~/.shh/config
, and I try to incorporate the same into my Snakefile
. Following the docs, I manage to connect, but not transfer the file:
from snakemake.remote.SFTP import RemoteProvider
SFTP = RemoteProvider(mkdir_remote=True, username='my.email@something.com', private_key='~/.ssh/id_rsa')
rule all:
input:
"bar.txt"
output:
SFTP.remote('server.com/bar.txt')
shell:
"cp {input} {output}"
does not transfer the file. Am I missing something? How is the sftp command from above executed using pysftp?
Thanks in advance!