User Tools

Site Tools


access

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
access [2023/04/21 10:47] olivieraccess [2025/03/10 10:51] (current) – [Computer Access] olivier
Line 13: Line 13:
 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 [[https://ubuntu.com/tutorials/command-line-for-beginners|quick guide]] that covers the basics of Linux shell operation. 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 [[https://ubuntu.com/tutorials/command-line-for-beginners|quick guide]] that covers the basics of Linux shell operation.
  
 +To use Key access, refer to the following page: [[access:sshkeys| Using SSH Keys]]
 ==== Private servers ==== ==== Private servers ====
-Some CIM computers are on a private (internal) McGill vlan (10.69.54.1/23).  These servers cannot be access directly from the internet  To access these computers, 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)+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:
 <code> <code>
 ssh -j <CIMUSERNAME>@barn.cim.mcgill.ca <CIMUSERNAME>@<PRIVATESERVER>.cim.mcgill.ca  ssh -j <CIMUSERNAME>@barn.cim.mcgill.ca <CIMUSERNAME>@<PRIVATESERVER>.cim.mcgill.ca 
 </code> </code>
 +
 +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**
  
  
Line 45: Line 51:
 ==== From a CIM server to your local machine ==== ==== From a CIM server to your local machine ====
 <code> <code>
-scp <CIMUSERNAME>@barn.cim.mcgill.ca:/home/<GROUPDIRECTORY>/<CIMUSERNAME>/<REMOTEFILE> <LOCALFILEPATH>+scp <CIMUSERNAME>@barn.cim.mcgill.ca:/home/<GROUPDIRECTORY>/<CIMUSERNAME>/<REMOTEFILE> <DESTINATION>
 </code> </code>
 +
 +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:
 +<code>
 +sshfs -o ProxyJump=<cimUsername>@barn.cim.mcgill.ca <cimUsername>@<computerHostname>.cim.mcgill.ca:/home/<filesystem>/<directory> <localMountTarget>
 +</code>
 +
 +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:
 +
 +<file>
 +Host barn
 +  HostName barn.cim.mcgill.ca
 +  User <cimUsername>
 +
 +Host <computerHostname>
 +  HostName <computerHostname>.cim.mcgill.ca
 +  ProxyJump barn
 +  User <cimUsername>
 +</file>
 +
 +You can then use the following command to mount remote directories:
 +
 +<code>
 +sshfs <computerHostname>:/home/<filesystem>/<directory> <localMountTarget>
 +</code>
 +
 +==== Filezilla ====
 +A more intuitive way to access your files is to use a file transfer client such as [[https://filezilla-project.org/index.php|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''.
 +
 +{{ ::filezilla1.png?direct |}}
 +
 +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.
 +
 +
 +===== Sudo on CIM Workstations =====
 +
 +> "With great power comes great responsibility..." - Uncle Ben, Spiderman
 +
 +> "God, root, what is difference?" - Pitr, User Friendly
 +
 +Generally speaking, users do not have sudo/root access on CIM workstations. This is because, unlike Windows or MacOS, Linux gives much more power to the user. Windows will give you warnings and/or prevent you from erasing critical system files, whereas if you use sudo carelessly, Linux will delete the running kernel without so much as a warning.
 +
 +Things to consider as a user with sudo:
 +  * sudo is the same as root which is the same as administrator.
 +  * sudo can be used to break your system. If you share your system with other users, you can/will break the system for them too.
 +  * If in doubt, ask us before trying something. Some things on CIM systems are done for a reason, or are configured in a specific way. There is often a reason for this.
 +
access.1682088477.txt.gz · Last modified: 2023/04/21 10:47 by olivier

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki