Table of Contents
Access to CIM Servers
Computer Access
You can use secure shell (SSH) to log into a CIM system. On a Linux or Mac system, you can directly ssh to to a cim machine with
ssh <CIMUSERNAME>@barn.cim.mcgill.ca
barn.cim.mcgill.ca is a publicly accessible CIM system available for everyone to use to log in.
If you are on another type of operating system, we suggest using an ssh client such as PuTTY to access the CIM servers.
Once connected to the server, you will be presented with a Linux command line. If unfamiliar with the Linux environment, here is a link to a quick guide that covers the basics of Linux shell operation.
Private servers
Some CIM computers are on a private (internal) McGill vlan (10.69.54.0/23). These servers cannot be accessed directly from the internet. To access these computers, you can use the McGill vpn to get on the McGill network, or you can use any public CIM server as an ssh jump host. (SSH jump hosts are a way to proxy ssh connections through one server to access another)
The command to connect to a private CIM computer is:
ssh -j <CIMUSERNAME>@barn.cim.mcgill.ca <CIMUSERNAME>@<PRIVATESERVER>.cim.mcgill.ca
As more people will be using jump hosts to access CIM resources, we are creating multiple publicly accessible jump hosts to help spread the load. The following jump hosts are available for use by CIM members:
- cow.cim.mcgill.ca
- pig.cim.mcgill.ca
PuTTY
If you are on another type of operating system, we suggest using an ssh client such as PuTTY to connect to CIM computers.
When you open PuTTY, you'll be presented with a configuration screen where only two options need to be configured, the server address (barn.cim.mcgill.ca) and the connection type (SSH).
Once configured, click open and the a shell should appear and prompt for your CIM username and password.
Private servers
To access private CIM servers, you'll need to configure an SSH proxy in PuTTY. To do so, you'll need a version of putty >0.77 and navigate to Connection > Proxy
and select SSH as the proxy type and specify the details of the jump host (barn.cim.mcgill.ca).
File Access
To transfer files to and from the CIM servers, you can use the scp
(secure copy) command.
From your local machine to a CIM server
scp <LOCALFILEPATH> <CIMUSERNAME>@barn.cim.mcgill.ca:/home/<GROUPDIRECTORY>/<CIMUSERNAME>/<DESTINATION>
From a CIM server to your local machine
scp <CIMUSERNAME>@barn.cim.mcgill.ca:/home/<GROUPDIRECTORY>/<CIMUSERNAME>/<REMOTEFILE> <DESTINATION>
It is also possible to define an ssh jump host to the scp commands by adding -j <CIMUSERNAME>@barn.cim.mcgill.ca
to access files located locally on private servers.
sshfs
To mount directories with sshfs, while going through a jump host, the following command can be used:
sshfs -o ProxyJump=<cimUsername>@barn.cim.mcgill.ca <cimUsername>@<computerHostname>.cim.mcgill.ca:/home/<filesystem>/<directory> <localMountTarget>
If you prefer defining the jump host in your ssh_config file for more convenient access, you should specify the jump host and the target hostname separately, as such:
Host barn HostName barn.cim.mcgill.ca User <cimUsername> Host <computerHostname> HostName <computerHostname>.cim.mcgill.ca ProxyJump barn User <cimUsername>
You can then use the following command to mount remote directories:
sshfs <computerHostname>:/home/<filesystem>/<directory> <localMountTarget>
Filezilla
A more intuitive way to access your files is to use a file transfer client such as filezilla.
To configure a connection to the CIM server, you'll have to define a new connection by navigating to File > Site Mananger
and then clicking New Site
.
Set the protocol to SFTP
, the host to barn.cim.mcgill.ca
and set your username. You can then click Connect
to connect to the CIM server. You will then be able to access and transfer files.