Connecting to cylc gui from Windows

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).

  1. Edit your PROFILE file.

notepad $PROFILE

  1. 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}
}
  1. 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

And to have ssh-add work, if not already installed, you will need administrator access and add the following:

Set-Service -Name ssh-agent -StartupType Automatic
Start-Service ssh-agent

I think this will work across reboots/logging out etc. Once you have ssh-add working when you enter your key password phrase the key should be cached and you won’t get asked for it again… You will need to enter your 6 number TOTP code for archer2 the first time you connect.

I suspect you will need to renter phrases and TOTP code across reboots!

Simon