ssh_command: Run a commmand on a remote server

Description Usage Arguments Value Examples

View source: R/submitter.R

Description

Run a commmand on a remote server using ssh.

Usage

1
ssh_command(command, remote, quiet = FALSE, stderr = FALSE, prompt = NULL, ...)

Arguments

command

(character) The command to run

remote

(remote_server) The remote server information.

quiet

(logical of length 1) Supress messeges.

stderr

Passed to the stderr argument of system2. If TRUE, Mix in standard error with output.

prompt

(character of length 1) Character to display in front of commands. Defualt: timestamp.

...

Passed to system2.

Value

(character) The standard output of the command.

Examples

1
2
3
4
5
6
## Not run: 

remote <- remote_server$new(server = "shell.somewhere.edu", user = "joeshmo", port = 345)
ssh_command(c("echo test1", "echo test2"), remote)

## End(Not run)

zachary-foster/qsubmitter documentation built on Nov. 27, 2020, 3:23 a.m.