UCSF-CBI / rstudio-server-controller

RStudio Server Controller (RSC) - A Tool for Launching a Personal Instance of the RStudio Server
https://github.com/UCSF-CBI/rstudio-server-controller
ISC License
4 stars 2 forks source link

RSC_SSH_LOGIN_HOSTNAME: Optional env var for suggesting a login host #96

Closed HenrikBengtsson closed 8 months ago

HenrikBengtsson commented 8 months ago

Background

rsc start uses a heuristic to find the login host on the current system. It does so based on the assumption that you logged into to the current host directly from a login host. This is used to give instructions, e.g.

ssh -L 20612:login.myuniv.org:20612 alice@dev1.myuniv.org

Issue

If you went via yet another host, then that heuristic fails and will give the wrong instructions, e.g.

ssh -L 20612:dev2.myuniv.org:20612 alice@dev1.myuniv.org

Suggestion

Add support for specifying the login hostname via a new environment variable RSC_LOGIN_HOSTNAME, e.g.

export RSC_LOGIN_HOSTNAME=login.myuniv.org
ssh -L 20612:login.myuniv.org:20612 alice@dev1.myuniv.org

This environment variable can centrally by the sysadm, or via environment module.

HenrikBengtsson commented 8 months ago

Oh, turns out this was already prepared for but never announced;

https://github.com/UCSF-CBI/rstudio-server-controller/blob/9f76e654ef9e43bafa884ec34fc83fbcee2a0ff9/bin/rsc#L619

However, we should rename it to have prefix RSC_.