...
If you create new user account for ecflow_ui but want to keep using your regular account, here is a handy script (this . This example uses Dynamic Port Forwarding method):, but can be easily adapted to use Local Port Forwarding method.
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
#!/bin/bash
set -e
# --------------------------------------------------------------
# A script for starting SSH SOCKS proxy and ecFlow UI as another user.
# Prerequisites:
# * User named "myecuser" must exist on the laptop
# * "myecuser" has set up their Teleport client to access ECMWF.
# --------------------------------------------------------------
ECMWF_USER=myecuser # your ECMWF username
ECMWF_HOST=myecworkstation # your ECMWF workstation name
xhost + || :
sudo -i -u "$ECMWF_USER" -- sh << SUDO
set -e
# Starting ssh-agent for $ECMWF_USER.
# Teleport service requires ssh-agent running.
ssh-agent -- sh << SSH_AGENT
set -e
# "tsh login" will fetch SSH certificate from
# shell.ecmwf.int and load it onto the ssh-agent.
tsh login -d
# "ssh -f" will start SSH tunnel in the background.
# The trap will terminate the tunnel on exit.
trap 'pkill -f ssh.*-f' 0 1 2 3 15
ssh -f -N -v -C -D9050 -J "$ECMWF_USER@shell.ecmwf.int" "$ECMWF_USER@$ECMWF_HOST"
# finally, start the local ecFlow UI
/Volumes/Macintosh\ HD/opt/miniconda3/bin/ecflow_ui
SUDO
SSH_AGENT |
...