Using SSH forwarding to connect to wwwstu.csci.viu.ca from home
Table of Contents
1 Using SSH forwarding to connect to wwwstu.csci.viu.ca from home
1.1 Prerequisites
- an ssh client that supports port forwarding; the default OpenSSH clients on Linux and other UNIX-alikes, including MacOS, do; so does 'PuTTY' on Windows
1.2 Overview
The basic idea is to create a listening point on your computer at home that gets "forwarded" over an SSH connection to the Computing Science login server, (typically) otter, and on to the web server, wwwstu.csci.viu.ca.
1.3 OpenSSH client instructions (Linux, MacOS, *BSD)
You connect to the login server using SSH, but include additional command line arguments to set up the "SSH tunnel" to the web server:
$ ssh -L 1234:wwwstu.csci.viu.ca:80 otter.csci.viu.ca Debian GNU/Linux 8 Password: ... $
(Here, the 1234
is an unused 'port number' on your computer above
1023
- 1234
tends to work in most cases.) After logging in, on
your computer you should now be able to access your web pages on the
CSCI student web server with the following URL:
http://localhost:1234/~USERNAME/...
where USERNAME
is your username and ...
is the path to the
specific page you want to access.
The SSH forwarding is active as long as the SSH connection persists.
1.4 PuTTY client instructions (Windows, Linux)
The PuTTY SSH client allows port forwarding to be set up prior to opening the connection as follows (tested on Versions 0.67 [Windows 7] and 0.63 [Debian GNU/Linux 8 - Jessie]):
- In the "Host Name (or IP Address)" box under "Session" section
type:
otter.csci.viu.ca
, and make sure the "Connection type" is "SSH" and the "Port" is22
. - In the left pane of the "PuTTY Configuration" window, open the "Connection->SSH" options.
- Click "Tunnels".
- In the small data entry box labelled "Source port" under "Add new
forwarded port:" type:
1234
- In the slightly larger data entry box labelled "Destination"
type:
wwwstu.csci.viu.ca:80
- Click the "Add" button. At this point, the following should
appear in the large box under the label "Forwarded ports:"
L1234 wwwstu.csci.viu.ca:80
- [Optional] Save the connection configuration for later use.
- Click the "Open" button and login to the server with your user name and password.
At this stage, you should be able to use your favourite browser to connect to your web pages with the URL from the previous section.