Table of Contents
SoCS SSH Access
What is SSH
SSH is a program that allows you to log in to and run programs on a remote server. It is used in the School of Computer Science to allow access to our Linux Servers from your own computer, where you can edit, compile, and run code for your labs and assignments. SSH comes in two part - the client and the server.
The SSH Server: The ssh server is a piece of software that runs on a remote computer and listens for connections from the SSH client.
The SSH Client: The SSH client runs on your own machine and allows you to connect to the server.
Required Software
To use SSH to connect to SoCS Servers, you must have an SSH Client installed. SSH is available for the most common operating systems: Windows, MacOS, and Linux.
Check if an SSH Client is Installed
Windows
A built in client is available on Windows, and can be accessed by opening the Windows Powershell application.
To check if ssh is installed, Open Windows Powershell, and type “ssh” followed by enter. You should see the following:
This client should be available by default, but if it is missing, follow the instructions in the Install SSH on Windows section.
Mac OS
The SSH client comes automatically installed as part of Mac OS. To access the ssh client, open the Terminal application, then type “ssh” followed by enter. You should see the following:
Linux
The SSH client is usually installed on most Linux distributions. To check that it is installed, open your Terminal application, then type “ssh” followed by enter. You should see the following:
Connecting to the SSH Server
Connecting to a Server
The commands to use SSH are the same from all operating systems. In general, the ssh command is ssh <username>@<hostname>.socs.uoguelph.ca
, where <username> is your Central Login ID and <hostname> is the name of the server you wish to connect to (i.e. linux, portkey).
The following are examples of commands to connect to the Schools “linux.socs” servers. While the prompts look slightly different, the behaviour is identical.
SSH from Off-Campus
SSH connections from off campus are restricted by the campus firewall.
- Preferred SSH Connections are enabled off-campus while running the Campus VPN. Follow the VPN Setup Guide to install. Once the VPN is running, ssh to the server as you would from on campus.
- Use SSH key based authentication to connect to Portkey from off campus, and then connect to the desired server. This is recommended only if you are unable to use the Campus VPN. To set this up, folow the SSH Key Authentication Guide
Install the SSH Client
Install SSH on Windows
- You can now open Windows Powershell and use SSH
Install SSH on Linux
APT
apt-get install openssh-client
YUM
yum -y install openssh-clients
Common Problems and Errors
Time Out
Problem
After entering the ssh command there is a blinking cursor with no response, or the following error
ssh: connect to host linux.socs.uoguelph.ca port 22: Operation timed out
Solution
If you are connecting from off campus, the most likely issue is that you are trying to connect to linux.socs.uoguelph.ca without the VPN. You should ensure you have followed the directions to install and run the Campus VPN.
Permission Denied
Problem
Every time you enter your password, you receive the following error:
Permission denied, please try again.
Solution
The most likely cause is that you are not specifying your username when trying to connect. If you type ssh linux.socs.uoguelph.ca
as your command, it will automatically use your computer's user account name as the username. Make sure you specify your username with ssh username@linux.socs.uoguelph.ca
.