-
Notifications
You must be signed in to change notification settings - Fork 0
VNC Setup
This document describes how you can set up your KBSG account such that you can work on a workstation remotely via VNC.
If you don't have a KBSG account yet, please contact [email protected].
We will create an account for you that allows you to access all KBSG workstations. All workstations use an NFS mount for /home
, therefore, you can switch between workstations seamlessly.
- Create a SSH key on the machine from which you want to connect to a lab machine.
- On any lab machine, log in to your account
- Add the public key of the key pair created in 1. to the file
~/.ssh/authorized_keys
(create that file if it does not exist
Proceed with the next section.
This is only necessary if
- You cannot get physical access to a KBSG workstation (e.g., due to a lockdown).
- You don't have SSH access with key authentication yet.
This procedure should only be used as last resort if the normal setup is not possible.
To bootstrap SSH key authentication:
-
Send an email to [email protected] so we can enable password login
-
Connect to kirk:
Your username is the first letter of your first name plus your last name (e.g.,
thofmann
). You will get your password during account creation (see above). -
Change your password:
passwd
-
On your local machine, generate an SSH key if you do not have one yet:
ssh-keygen
-
Copy the key onto kirk:
ssh-copy-id [email protected]
-
Verify that you can connect to kirk without typing your password.
-
Send an email to [email protected] and let us know that you are done.
-
To overwrite the username (e.g., if your local username does not match your KBSG username), add the following snippet to
~/.ssh/config
:Host *.kbsg.rwth-aachen.de User $USER
where
$USER
is your KBSG username, e.g.,thofmann
.
The machine kirk.kbsg.rwth-aachen.de
is the only one that is accessible from the public. If you want to connect to a different machine, you need to connect to kirk and then connect to your target machine.
You can also configure SSH ProxyJumping so you don't need to do this manually every time.
-
For a one-shot proxy connection, use
-J
, e.g.,$ ssh -J kirk.kbsg.rwth-aachen.de stargazer.kbsg.rwth-aachen.de
to connect to
stargazer
via the proxykirk
. -
To configure proxy jumping permanently, add the following snippet to
~/.ssh/config
:Host *.kbsg.rwth-aachen.de !kirk.kbsg.rwth-aachen.de ProxyJump kirk.kbsg.rwth-aachen.de
-
Let us know that you need VNC access. We will assign you to a primary workstation that you can work on and enable VNC for you.
Admin: Add user to ansible playbook
vnc.yaml
. -
Set a VNC password. Connect to your workstation and run:
$ vncpasswd
VNC passwords are not stored in a safe way. Use a throw-away password!
Available workstations:
- defiant
- enterprise
- agamemnon
- orinoco
- stargazer
- pegasus
- voyager
- dallas
- yamato (with GPU)
- venture (with GPU)
- alhambra
- california
Whenever you want to connect to a workstation named $workstation
, do the following:
-
Boot the machine if it is not running already:
$ ssh kirk.kbsg.rwth-aachen.de wakemachine $workstation
-
On the workstation, run
startvnc.bash
.$ ssh $workstation.kbsg.rwth-aachen.de startvnc.bash
-
The script tells you the command that you need to run to connect to the workstation.
With the following function in your ~/.bashrc
, you can connect with a single command:
function vnc () {
ssh kirk.kbsg.rwth-aachen.de wakemachine $1 || (echo "Failed to wake $1"; exit 1)
ret=1
while [ $ret -ne 0 ] ; do ping -q -c 1 $1; ret=$?; sleep 1; done
ssh $1 startvnc.bash
vncviewer -via $1 $1:${2-1105}
}
where you need to replace 1105
by your respective VNC display (which is in the output of startvnc.bash
).
After that, just run
$ vnc yamato.kbsg.rwth-aachen.de
to boot yamato, wait for the boot to complete, start VNC and connect to it.
By default, a session is automatically terminated after 24 hours. If you need to have a long-running session, e.g., because you are running a benchmark, then create the empty file /tmp/long-session-$USER
, e.g., with:
touch /tmp/long-session-$USER
Please remember to remove the file when you no longer need the long-running session.
To use VNC on Windows, you need to do the following:
- Start the VNC server on the remote, as described above
- Set up SSH tunneling, e.g., with PuTTY and Xshell.
- Set
kirk.kbsg.rwth-aachen.de
as Host Name - Configure a tunnel from local port
5900
to the remote host and port that you want to connect to, e.g., hostventure
and port7005
. The output ofstartvnc.bash
will tell you which port to use.
- Set
- Use a VNC client to connect to
localhost:5900
:- With TightVNC:
- Go to Options -> Scale and select "Auto" to get full screen resolution
- With TigerVNC:
- Go to Options -> screen and select "Resize remote session to the local window" and "Full-screen mode"
- With TightVNC:
- If necessary, set the screen resolution within the VNC session to your native screen resolution
- If VNC Viewer returns the message: "Loopback connections are disabled" or your PC is connected to itself, you can try another local port, such as '5910'.