This page describes some ways to connect to the course account from Macs.
Samba lets you mount the course account as a drive/folder so that you can work with the course's files in a Finder window.
If you encounter connection issues like random disconnects or it takes forever to connect, an alternative to Samba is SSHFS, described below.
Getting Access: You will be given access automatically in your first week of work. If you don't have access, please ask your CSCF Point of Contact or your ISC (your ISC will then contact CSCF, because only CSCF staff can give Samba access).
Step 1 (if off-campus): If you're off-campus, like at home, first connect to the campus network using the UW Cisco AnyConnect VPN.
Step 2: Click on the desktop or the Finder icon in the Dock (bar at the bottom of the screen). Then in the Finder menu bar at the top of the screen, click on Go and choose "Connect to Server..."
Step 3: Use Server Address:
smb://smb-files.student.cs.uwaterloo.ca/csNNN
You can click the '+' button to save the address. Click Connect.
Step 4: For Name, enter your WatIAM ID (yourQuestID) and use your student.cs password (reset password if needed). Click Connect.
On some Macs, you may have to login as TEACHING\yourQuestID.
You can work with course account files by typing commands in a Terminal.
Getting Access: Find someone who already has access to the course account, like your ISC or fellow ISA. They can add you by editing the
/u/csNNN/.rhosts
file in the course account. The next time the clock's minute hand hits 4, the
/u/csNNN/.ssh/authorized_keys
file will be updated to include you, and then you can SSH into the course account. If you're in a rush and can't wait, you can edit the
/u/csNNN/.ssh/authorized_keys
file directly by adding your own
/u/yourQuestID/.ssh/id_rsa.pub
key to the top of the authorized_keys
file.
Step 1: SSH into your own account first. Open the Terminal and run:
ssh yourQuestID@linux.student.cs.uwaterloo.ca
For security, nothing will be displayed as you type in your password. Reset your password if needed.
Step 2: Once you're in your own account, run:
ssh csNNN@localhost
If you've created a passphrase, you'll be asked to type it in. If you're asked if you want to continue connecting, enter "yes".
SSHFS mounts the course account as a drive/folder like Samba, but it uses SSH. You will be able to work with the course's files in a Finder window.
Getting Access: You just need to be able to SSH into the course account. See previous section. The SSHFS program is automatically installed on ISA Macminis. On other Macs, download and install both "FUSE" and "SSHFS" from https://osxfuse.github.io/
Step 1: Open a Terminal and run these 3 commands. You don't need to SSH into anything, just run them when the Terminal opens. The second command will ask for your password because it connects to your own account.
sshfs yourQuestID@linux.student.cs.uwaterloo.ca: ~/yourQuestID -o volname=yourQuestID-ssh
sshfs csNNN@linux.student.cs.uwaterloo.ca: ~/csNNN -o IdentityFile=~/yourQuestID/.ssh/id_rsa -o volname=csNNN-ssh
Explanation:
-p
means "do nothing if the folders already exist."
Step 2: Your account and the course account should show up as drives on the Desktop. If not, they should show up in your home folder (on Finder menu bar, click Go then Home). You can disconnect from the accounts by right-clicking the drive/folder, and choosing Eject.
Step 3 (optional): To save time, you can copy-paste the 3 commands into a file (for example, with name sshfs.sh
). Then run bash sshfs.sh
command. This way, you won't have to type the 3 commands each time you log back in to your Mac.
Unmounting: Use the umount
command for each account you want to unmount. For example, to unmount your own account and a course account, run:
umount ~/yourQuestID
umount ~/csNNN
2024-08-28: Current versions of MacOS restrict installing kernal extensions such as MacFuse. You need to restart your Mac in recovery mode, find the menu option for the security settings/policy, and change the security policy from "full" to "partial" or something like that. I'm not personally interested in doing that on my machine, although I acknowledge the chance of something going awry probably isn't that great. -- bwbecker
If your concern is primarily editing a batch of files and you use the VS Code editor, a slick solution appears to be installing the "Remote - SSH" extension from Microsoft. It allows you to show a remote directory in the left pane of VS Code and navigate it easily, just like opening a local directory.