Use SSH-tunneled mirai daemons
use_mirai_ssh.RdHelper function to connect to remote machines via SSH, with optional tunneling for firewalled environments.
Examples
# \donttest{
# Connect through SSH tunnel
use_mirai_ssh(
remotes = c("ssh://node1", "ssh://node2"),
tunnel = TRUE
)
#> $backend
#> [1] "mirai"
#>
#> $by
#> character(0)
#>
#> $n
#> NULL
#>
#> $url
#> function ()
#> mirai::local_url(tcp = TRUE, port = port)
#> <bytecode: 0x55bd75212560>
#> <environment: 0x55bd75212b10>
#>
#> $remote
#> function ()
#> mirai::ssh_config(remotes, tunnel = TRUE)
#> <bytecode: 0x55bd75212138>
#> <environment: 0x55bd75212b10>
#>
#> $dispatcher
#> [1] TRUE
#>
#> $tls
#> [1] FALSE
#>
#> $port
#> [1] 40491
#>
#> $stop_on_exit
#> [1] TRUE
#>
#> $within
#> [1] "mirai"
#>
#> $workers_within
#> NULL
#>
#> $chunks_per_job
#> [1] 1
#>
#> attr(,"class")
#> [1] "parade_dist"
# Direct SSH without tunneling
use_mirai_ssh(
remotes = c("ssh://compute1", "ssh://compute2"),
tunnel = FALSE
)
#> $backend
#> [1] "mirai"
#>
#> $by
#> character(0)
#>
#> $n
#> NULL
#>
#> $url
#> NULL
#>
#> $remote
#> function ()
#> mirai::ssh_config(remotes)
#> <bytecode: 0x55bd75212368>
#> <environment: 0x55bd76d23478>
#>
#> $dispatcher
#> [1] TRUE
#>
#> $tls
#> [1] FALSE
#>
#> $port
#> [1] 40491
#>
#> $stop_on_exit
#> [1] TRUE
#>
#> $within
#> [1] "mirai"
#>
#> $workers_within
#> NULL
#>
#> $chunks_per_job
#> [1] 1
#>
#> attr(,"class")
#> [1] "parade_dist"
# }