Remote connect with SSH on Mac
for Kusum and other "admin" people
These instructions are for Mac users.
See also instructions for Windows users.
Once-only setup
Follow the setup instructions in
SSH HowTo
and also do as follows.
-
Install both macFUSE and SSHFS from
osxfuse.github.io
allowing security settings for MacFUSE, then restart your laptop.
-
Set up a command to connect to some drives.
Note that bianco H and enna X home directories have been "merged",
now named M (because Windows MCS use H for something else).
NOTE: replace MATHSNAME by your Maths login name!
U=MATHSNAME
echo "# Script to mount some sshfs drives" > ~/bin/mdrives
M="mkdir -p"; S="sshfs -o follow_symlinks -o uid=$(id -u) -o gid=$(id -g) -o volname"; V="-p 12022 $U@localhost"
N=M-home; D=.; echo "$M ~/$N; $S=$N $V:$D ~/$N" >> ~/bin/mdrives
N=L-local; D=/usr/sms; echo "$M ~/$N; $S=$N $V:$D ~/$N" >> ~/bin/mdrives
N=N-nobackup; D=/nb/$U/; echo "$M ~/$N; $S=$N $V:$D ~/$N" >> ~/bin/mdrives
N=Y-shared; D=/users/misc/shared; echo "$M ~/$N; $S=$N $V:$D ~/$N" >> ~/bin/mdrives
N=T-teaching; D=/users/misc/teaching; echo "$M ~/$N; $S=$N $V:$D ~/$N" >> ~/bin/mdrives
Set up another command to disconnect them all.
echo 'for n in ~/[A-Z]-*; do umount $n 2>/dev/null; done' > ~/bin/udrives
-
Fix permissions of the command files we created
chmod 700 ~/bin/mdrives ~/bin/udrives
-
Those enna "drives" M-home etc will be under your "home", not under
Documents (where they might be hard to find amongst the many objects).
To see them in Finder, you need to add your Mac "home" to your Favorites:
in Finder choose Preferences, then Sidebar, and place a tick next to the
"home" icon (that shows your username): see
demo here.
-
For printing setup follow the instructions in
SSH HowTo CUPS and
Visitors printing Mac
so using http://localhost:12631/printers/eslw or similar.
How to use (daily)
When done for the day, close everything in the "right" order:
- In a terminal window on your laptop (not the enna window),
type command udrives to disconnect your drives.
- Close all your mupdate, rosters etc windows
- Type exit to close the enna window
Paul Szabo
psz@maths.usyd.edu.au
10 Mar 23