if (FALSE) {
# recursively upload files and directories
session <- ssh_connect("dev.opencpu.org")
files <- c(R.home("doc"), R.home("COPYING"))
scp_upload(session, files, to = "~/target")
# download it back
scp_download(session, "~/target/*", to = tempdir())
# delete it from the server
ssh_exec_wait(session, command = "rm -Rf ~/target")
ssh_disconnect(session)
}
Run the code above in your browser using DataLab