SSH with X-forwarding allows you to run terminal and graphical programs on a remote Linux server through a SSH connection.

How to Use SSH with X-forwarding

ALERT Note: You will need to Connect to the SECS VPN before SSHing onto a SECS Linux server from off campus.

  1. Open the appropriate application:

    1. For Linux systems, open the terminal.

    2. For Mac systems, open XQuartz. XQuartz is an app that comes standard on all Macs since version 10.5. It can be found in Applications -> Utilities -> X11 or XQuartz.

Note: If your Mac does not have X11 on it, you can download it from the XQuartz website.

  1. Type the following:

Note: that the -Y is a capital Y

$ ssh -Y username@hostname.secs.oakland.edu


$ ssh -Y username@IPaddress

Were username is your SECS username, hostname is the name of the SECS Linux server you would like to connect to, and IPaddress is the IP address of the SECS Linux server you would like to connect to.

For example:

$ ssh -Y astudent@beatles.secs.oakland.edu
$ ssh -Y astudent@
  1. To launch a program, type the path to the executable followed by an ampersand (&). For example:
$ /usr/bin/firefox &

This will open a session of the application but still leave the terminal available for more commands. You can also run multiple instances of the program by using the ampersand.

Some programs already have scripts written on the general purpose Linux servers so you only have to type the name of the program followed by the ampersand. For instance:

$ matlab &
  1. When you are done with a program, make sure you kill the process. You can check to make sure it is closed out properly by typing:
$ jobs -l

If a process that you closed is still running, type the following command to stop it:

$ kill processid

processid is the process ID or PID shown by the jobs -l command

For example:

$ kill 1480

More information on managing processes in a Linux environment can be found here.