.. _connecting-viking: Connecting to Viking ==================== .. attention:: Before you can connect to Viking you'll need a :ref:`project code and a user account`. To access Viking you'll need to be on the campus network or using the VPN (see below). Terminal access --------------- Linux, MacOS and Windows PowerShell ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. tip:: The latest builds of Windows 10 and Windows 11 include a built-in ``ssh`` client, so you can run ``ssh`` commands directly from a ``CMD`` or ``PowerShell`` window. To run either of these search for ``CMD`` or ``PowerShell`` from the Windows search box and then type in the below command. If you're using a personal device and need to install the ``ssh`` client please follow the `Microsoft website `_. Alternatively you can install ``PuTTY`` and use it as :ref:`described below `. To log in from a terminal emulator, use the following command: .. code-block:: console :caption: remember to substitute 'abc123' for your own username $ ssh abc123@viking.york.ac.uk You will be prompted for your IT Services password. .. note:: If you previously connected to the old Viking then you may see a warning that the fingerprint has changed. Please see the :doc:`FAQ ` for how to overcome this. .. _connecting-via-windows: Windows ^^^^^^^ Alternatively, for terminal access to Viking from a Windows desktop, you can install `PuTTY `_ (or comparable software). Configuring PuTTY to connect to Viking """"""""""""""""""""""""""""""""""""""" Open PuTTY and configure it to connect to Viking: 1. Add the name 'viking.york.ac.uk' to the 'Host Name' field 2. Check the 'Connection Type' to SSH 3. Type the name 'Viking' in 'Saved Sessions' 4. Click 'Save' .. image:: ../assets/img/putty1.png Connecting to Viking """"""""""""""""""""" 1. Start PuTTY 2. Select 'Viking' from the 'Saved Sessions' 3. Click 'Open' .. image:: ../assets/img/putty2.png A terminal window should appear. Log in with your University username and password. .. image:: ../assets/img/putty3.png If you are successful this is what you will see: .. image:: ../assets/img/putty4.png .. _connecting-off-campus: Connecting from off campus -------------------------- Viking has been configured to only allow connections from the University network. Therefore, in order to access Viking off-campus, you must first connect to either the VPN service, or create an ``ssh`` tunnel. These re-route your traffic through the University network allowing you to connect to Viking as if you were on campus. Using the VPN ^^^^^^^^^^^^^ Please see the main IT Services page on using the VPN found `here `_. Once you're connected to the VPN you will be able to :doc:`connect to Viking `, for example: .. code-block:: console :caption: remember to substitute 'abc123' for your own username $ ssh abc123@viking.york.ac.uk SSH gateway ^^^^^^^^^^^ The University also provides an `SSH gateway service `_ that can be used to allow off-campus access to Viking, as an alternative to the VPN. To use this method, ``ssh`` to ``ssh.york.ac.uk`` (substituting your username for ``abc123``): .. code-block:: console $ ssh abc123@ssh.york.ac.uk Once you have entered your password and gone through the 2FA (two-factor authentication), you should then see the following message asking which machine you wish to connect to. Simply enter ``viking`` and press ``Enter``. .. code-block:: console The following options are available: - Enter the name of the machine you wish to ssh to. - Enter 'username@machine' to use a different username. Enter York host or service name: viking Jump hosting via the SSH gateway ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To avoid manually entering the hostname when using the SSH gateway, it's also possible to directly connect to Viking by "jump hosting": .. code-block:: console ssh -J abc123@ssh.york.ac.uk abc123@viking .. hint:: You will still need to enter your password, and then complete the 2FA