Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sftp on windows #505

Closed
flibustenet opened this issue May 3, 2016 · 2 comments
Closed

sftp on windows #505

flibustenet opened this issue May 3, 2016 · 2 comments

Comments

@flibustenet
Copy link

I'm sorry to ask a maybe not related question to restic.
What is the simplest way to use sftp on windows ? I know putty i cannot make it work with restic.

Maybe it's on the roadmap to don't need any external ssh cmd ?

@fd0
Copy link
Member

fd0 commented May 3, 2016

Hey, thanks for the suggestion. At the moment, restic depends on an external command ssh so that we do not have to manage the ssh configuration, which is rather complex. It's not planned, but there is the possibility to use an internal ssh implementation. but we'll tackle that problem later.

Maybe you can install ssh via Cygwin or so? I don't have a Windows system...

@fd0 fd0 closed this as completed May 3, 2016
@fd0 fd0 added the feature label May 3, 2016
@burritts
Copy link

burritts commented Feb 4, 2017

I'd like to share some information regarding using plink.exe (from the Putty family) for sftp on Windows:

I hacked src/restic/backend/sftp/sftp.go to look for a couple of environment variables that give the location of the plink executable and my private key ppk file, and if they are defined construct the ssh command line like so:

/path/to/plink.exe -s -l username -i /path/to/myprivatekey.ppk hostname sftp

I have not done extensive testing, but listing snapshots, backup, and restore seem to work. "restic init" fails with "ssh": executable not found, so obviously there's another spot that needs some work to use plink.exe instead of the hardcoded "ssh".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants