SSH

SSH stands for Secure SHell, and creates a encrypted connection between you and the place you are connecting to. In this article we discuss how to create an SSH connection to NTNU's servers, some SSH clients, as well as how to use SSH with X-window.

Norsk versjon - Sikker med SSH

Looking for something else? Topic page about IT services | Pages labeled with ssh  

login.stud.ntnu.no vs login.ansatt.ntnu.no #

Students can connect to login.stud.ntnu.no using SSH with their computers built in terminal-application as described below, or use one of the programs described further down. Employees can connect to login.ansatt.ntnu.no.

Throughout this article, we will use login.stud.ntnu.no in examples. Replace this with login.ansatt.ntnu.no if you are an employee.

SSH using terminal #

The simplest way to connect using SSH is to use your computers default terminal-application. The example below shows how to connect to login.stud.ntnu.no using SSH.

  1. Open a terminal-application
    • Mac: Open the application: Terminal
      (Press cmd+spacebar and search for "terminal")
    • Windows: Open the application: Command Prompt
      (Press the Windows-button and search for "Command Prompt")
  2. Enter and run the following command: ssh username@login.stud.ntnu.no
    (Replace "username" with your own NTNU-username)

To read about what you can do with SSH,  run the command "man ssh" in the terminal/shell. This will show you the SSH manual pages. 

Programs #

This is a variety of links to different SSH clients you can install on your computer. As mentioned above it is not necessary to install any of these programs to use SSH.

These programs are meant to be installed on your personal computer only. Do not install them on NTNU computers without speaking with the system administrator first. The system administrator should ensure that an SSH client is installed on all NTNU computers.

ClientOperating systemLicense type
TermiusiOS/AndroidFree/Subscription
OpenSSH  UNIX, Linux, MacOS  Freeware
PuTTYWindowsFreeware/Shareware
iTermMacOSFreeware/Donationware

Setting up X-window forwarding with SSH #

What is X-Window Forwarding? #

With X-Window Forwarding you can access graphical applications on your personal computer, even if the applications are on one of NTNU's servers.

Setup (Windows) #

X-windowing is not found on standard Windows installations, but you can connect to an X-window server by using X-Win32 and then connecting to login.stud.ntnu.no when you are asked what server to connect to.

Setup (Linux/UNIX/MacOS X) #

  1. Install X-window tools
  2. Open a terminal/console and run the command: ssh -X -C username@login.stud.ntnu.no

This sets up X-window forwarding automatically. The DISPLAY variable on the computer you are logging onto should also be set automatically upon login. The -C option compresses the connection, which is desirable when forwarding X-window. If you encounter any issues, read on to the section below.

Common problems #

Troubleshooting on the computer you connect to (X-window) #

To check if the DISPLAY variable was set correctly, you should run the following command in bash/csh/tcsh:

env | grep DISPLAY

(note that this command is case sensitive). You should then get a result that looks something like:

DISPLAY=localhost:16.0

The number after DISPLAY=localhost: can vary from login to login, and you are not supposed to set DISPLAY yourself. This will set up a normal, unencrypted connection.

Troubleshooting on the machine you are connecting with(X-window) #

Remember that the DISPLAY variable must be correctly set on the machine you are connecting with. This is not set automatically. If you are connecting with Linux from home, you can use the console to check that the DISPLAY variable has been set correctly by running:

env | grep DISPLAY

This will normally return

DISPLAY=localhost:0.0

You can test if this works by running:

xterm

If you don't receive any error messages, and a new terminal window appears, everything is set up correctly. If not you should set the DISPLAY variable manually. In bash, that is done by running the following command:

export DISPLAY=localhost:0.0

and in csh/tcsh the same operation is done by running:

setenv DISPLAY localhost:0.0

Also see #

Contact #

Orakel Support Services can help you install an SSH client, and show you how to connect to NTNU's servers.

0 Vedlegg
22386 Visninger
Gjennomsnitt (0 Stemmer)