Skip to content

Nonstandard R path via SSH #281

@mschubert

Description

@mschubert

Not sure where to place this...but I had the issue of having to log into my cluster via ssh where R is only available upon loading a specific module to make the R version available. It took me almost a day to figure out what to do:

The key step was to come up with this modified SSH template:

ssh -o "ExitOnForwardFailure yes" -f \
    -R {{ ctl_port }}:localhost:{{ local_port }} \
    -R {{ job_port }}:localhost:{{ fwd_port }} \
    {{ ssh_host }} \
    "source /etc/profile; module load R-bundle; (/absolute/path/to/bin/R --no-save --no-restore -e \
        'clustermq:::ssh_proxy(ctl={{ ctl_port }}, job={{ job_port }})' \
        > {{ ssh_log | /dev/null }} 2>&1 )"

Note the sourcing of /etc/profile and use of the absolute path to R. Maybe this is worth including in the doc? Sorry if this is off topic here, but this issue got me on track (or at least I came across it).

Originally posted by @wds15 in #193 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions