R/rsh.R

Defines functions rsh

Documented in rsh

#' execute a command remotely via ssh
#'
#' @param cmd the command to execute
#' @param hostname the remote machine
#' @param username currently works with ssh keys rather than password
#' 
#' @export
rsh <- function(cmd, hostname="troodon.scicom.picr.man.ac.uk",username="pschofield"){
  system(paste0("ssh -Y ",username,"@",hostname," '-l -c bash ",cmd,"'"),intern=T)
}
PietaSchofield/plibb documentation built on May 6, 2019, 6:45 p.m.