In Cylc 8 GUI on Puma Ros explained how to set up remote access to cylc gui@puma2 on macs and provided a hint on what was needed for linux machines. Sadly, I have a windows box and with a bit of hacking around and a lot of AI help I generated a power shell function that does what is needed. This requires you to have openssh installed on your machine. You will need to follow Ros’s guidance on your ~/.ssh/config file.
This is what my ~/.ssh/config file looks like:
# archer
Host archer2
User tetts
Hostname login.archer2.ac.uk
IdentityFile ~/.ssh/id_rsa_archer2
IdentitiesOnly yes
ForwardX11 yes
# as suggested by David de Klerk. If probs delete controlmasters direct
# ControlPath ~/.ssh/controlmasters/%r@%h:%p ## DOES not work with windows ssh
ControlMaster auto
ControlPersist 8h
# puma2
Host puma2
User tetts
IdentityFile ~/.ssh/id_rsa_archer2
ProxyJump archer2
Then start a terminal window (which on my machine is windows powershell with ssh).
- Edit your PROFILE file.
notepad $PROFILE
- Add the following function to it:
function puma-ui {
$PORT = Get-Random -Minimum 10000 -Maximum 65001
$CMD='bash -l -c \"export CYLC_VERSION=8; cylc --version ; cylc gui --no-browser --new -Application.log_level=WARN --port-retries=0 --port='+${PORT}+'\"'
ssh -t -L "${PORT}:localhost:${PORT}" puma2 ${CMD}
}
- To try it out.
. $PROFILE
puma-ui
This works across reboots/logging out etc. If you don’t want to put your password in every time explore ssh-add on windows…
Simon