@@ -23,7 +23,7 @@ SSH = R6::R6Class("SSH",
23
23
# set forward and run ssh.r (send port, master)
24
24
opts = private $ fill_options(ssh_log = ssh_log , ssh_host = ssh_host )
25
25
ssh_cmd = fill_template(private $ template , opts ,
26
- required = c(" local_port" , " remote_port " , " ssh_host" ))
26
+ required = c(" local_port" , " ssh.hpc_fwd_port " , " ssh_host" ))
27
27
28
28
# wait for ssh to connect
29
29
message(sprintf(" Connecting to %s via SSH ..." , sQuote(ssh_host )))
@@ -52,11 +52,10 @@ SSH = R6::R6Class("SSH",
52
52
ssh_proxy_running = TRUE ,
53
53
54
54
fill_options = function (... ) {
55
- values = utils :: modifyList(private $ defaults , list (... ))
56
- # TODO: let user define ports in private$defaults here and respect them
57
- values $ local_port = sub(" .*:" , " " , private $ addr )
58
- values $ remote_port = sample(50000 : 55000 , 1 )
59
- values
55
+ args = list (... )
56
+ args $ local_port = sub(" .*:" , " " , private $ addr )
57
+ args $ ssh.hpc_fwd_port = getOption(" clustermq.ssh.hpc_fwd_port" , sample(50000 : 55000 , 1 ))
58
+ utils :: modifyList(private $ defaults , args )
60
59
},
61
60
62
61
finalize = function (quiet = self $ workers_running == 0 ) {
0 commit comments