Skip to content

Instantly share code, notes, and snippets.

@fepegar
Last active June 14, 2019 16:26
Show Gist options
  • Save fepegar/f18d959b2adafae38cd39bc19552263d to your computer and use it in GitHub Desktop.
Save fepegar/f18d959b2adafae38cd39bc19552263d to your computer and use it in GitHub Desktop.
How to mount the cluster on a local directory on Linux

Locally

ssh-keygen -t rsa -b 4096 -C "[email protected]"  # generate the SSH key
xclip -sel clip < ~/.ssh/id_rsa.pub  # send the key to che clipboard
ssh [email protected]  # SSH to storm
ssh-add

On storm

[Add the previous key to ~/.ssh/authorized_keys], then

ssh-keygen -t rsa -b 4096 -C "[email protected]"  # generate the SSH key
xclip -sel clip < ~/.ssh/id_rsa.pub  # send the key to che clipboard
ssh [email protected]

On comic100:

[Add both SSH keys to ~/.ssh/authorized_keys]

Locally

Add this to ~/.ssh/config:

Host comic100
    User your_cs_username
    HostName comic100.cs.ucl.ac.uk
    proxyCommand ssh -W comic100.cs.ucl.ac.uk:22 [email protected]

Install sshfs and mount the remote dir:

sudo apt install sshfs
mkdir ~/cluster
sshfs comic100:/ ~/cluster

If you want to mount on startup, add the corresponding line to /etc/fstab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment