ssh icon indicating copy to clipboard operation
ssh copied to clipboard

problem using scp on a complete folder tree

Open luca-scr opened this issue 5 years ago • 0 comments

I have an issue when I'm trying to ssh copy a complete local folder tree to a remote server. Here is the skeleton code I used:

library(ssh)
session <- ssh_connect("<user>@<server.address>")
scp_upload(session, files = "~/<local_path>/<folder>", to = "~/<remote_folder>")
ssh_disconnect(session)

The problem is that files are recursively copied from "~/<local_path>/<folder>" to "~/<remote_folder>/<folder>" and not to "~/<remote_folder>" as I would like to get. Any hints are welcomed.

luca-scr avatar Oct 09 '20 07:10 luca-scr