SshResourceClient | R Documentation |
SSH resource client
SSH resource client
A R6 object of class SshResourceClient
Connects to a SSH server.
resourcer::ResourceClient
-> resourcer::CommandResourceClient
-> SshResourceClient
new()
Create a SshResourceClient instance. This client will interact wtih a computation resource using ssh commands.
SshResourceClient$new(resource)
resource
The computation resource.
The SshResourceClient object.
getAllowedCommands()
Get the command names that can be executed.
SshResourceClient$getAllowedCommands()
A character vector
getConnection()
Get or create the SSH connection object, for raw interaction.
SshResourceClient$getConnection()
The SSH connection object.
downloadFile()
Download one or more files (wilcard * is supported in the file name (which can be a directory))
SshResourceClient$downloadFile(file, to = ".", verbose = FALSE)
file
The file path(s) to download, either absolute or relative to the working directory.
to
The download destination.
verbose
If TRUE, details the file operations on the console output.
The paths of the files having been downloaded.
uploadFile()
Upload one or more files
SshResourceClient$uploadFile(file, to = ".", verbose = FALSE)
file
The file or vector of files to upload.
to
The upload destination, either absolute or relative to working directory.
verbose
If TRUE, details the file operations on the console output.
The paths of the files having been uploaded.
tempDir()
Get connection's temporary directory in the remote server, create it if it does not exists.
SshResourceClient$tempDir()
The path to the temporary directory.
removeTempDir()
Remove the connection's temporary directory from the remote server, if it was defined.
SshResourceClient$removeTempDir()
exec()
Executes a ssh command.
SshResourceClient$exec(command, params = NULL, test = FALSE)
command
The command name.
params
A character vector of arguments to pass.
test
If TRUE, the command is printed but not executed (for debugging).
The command execution result object.
close()
Close the SSH connection.
SshResourceClient$close()
clone()
The objects of this class are cloneable with this method.
SshResourceClient$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.