Difference between revisions of "Sshfs"

From Storrs HPC Wiki
Jump to: navigation, search
(Created page with "= Introduction = You can make files from the HPC cluster look like they are on your local computer, and use all the tools you have on your local computer to read and write fil...")
 
(Introduction)
 
Line 3: Line 3:
 
For example, if you have a spreadsheet on the HPC cluster, you open your spreadsheet program on your local computer and work on the remote spreadsheet.  You can read it, edit it, and save it, all without explicitly transfering the file back and forth.  You could do the same with a local editor, or local graphing program, etc.
 
For example, if you have a spreadsheet on the HPC cluster, you open your spreadsheet program on your local computer and work on the remote spreadsheet.  You can read it, edit it, and save it, all without explicitly transfering the file back and forth.  You could do the same with a local editor, or local graphing program, etc.
  
This can be done using the ''sshfs'' program.  It is available for Linux, Mac and Windows (I need to confirm that ...).
+
This can be done using the ''sshfs'' program.  Run ''sshfs'' on your local computer (''not'' on the cluster).  It is available for Linux, Mac and Windows (I need to confirm that ...).
  
 
= Obtaining sshfs =
 
= Obtaining sshfs =

Latest revision as of 10:25, 19 May 2021

Introduction

You can make files from the HPC cluster look like they are on your local computer, and use all the tools you have on your local computer to read and write files. For example, if you have a spreadsheet on the HPC cluster, you open your spreadsheet program on your local computer and work on the remote spreadsheet. You can read it, edit it, and save it, all without explicitly transfering the file back and forth. You could do the same with a local editor, or local graphing program, etc.

This can be done using the sshfs program. Run sshfs on your local computer (not on the cluster). It is available for Linux, Mac and Windows (I need to confirm that ...).

Obtaining sshfs

Linux

Sshfs is a standard package available with Ubuntu and Debian (sudo apt install sshfs), and with Red Hat (yum install sshfs)

Windows

See [ https://github.com/billziss-gh/sshfs-win | sshfs-win website ] for downloading sshfs'.

Mac

See [ https://osxfuse.github.io/https://osxfuse.github.io/ | sshfs for Mac website ] for downloading sshfs

Using sshfs

1. You can only use sshfs on a computer that has ssh access to the HPC clutser login nodes. This means that you must be on campus, or connected to the campus via the VPN.

2. Choose a local directory under which you will mount the cluster directory. We'll use hpcmount in the example below.

3. Choose which directory you'd like to mount from the cluster. You can choose your entire home directory, or another directory either under your home directory or elsewhere.

4. When you are done using the directory mounting the HPC cluster directory, run fusermount -u ~/hpcmount to unmount it. Replace ~/hpcmount with whatever directory you used in it's place.

Example

NOTE: This example is for Linux. Modify for your system accordingly

#  Make the directory hpcmount that you will use to mount the cluster directory
mkdir hpcmount

#  Mount your entire home directory
sshfs MY-NETID@login.storrs.hpc.uconn.edu: ~/hpcmount

#  List files in ~/hpcmount
cd ~/hpcmount
ls

#  Umount the directory
fusermount -u ~/hpcmount

~