Install sshfs package
On Ubuntu/debian:
# sudo apt-get install sshfs
On RHEL/CentOS/Fedora:
# sudo yum install fuse-sshfs
Create a local directory
# mkdir ~/homeNCG
Mount your remote folder
# sshfs martinsj@fermi.ncg.ingrid.pt: ~/homeNCG
When you're done, you can unmount it
# fusermount -u ~/homeNCG
.bashrc tunning
In case you're dealing with very long paths, as a suggestion, you can add to your ~/.bashrc file the following:
alias mfermi='f(){ dir=$1 ; [ -n "$dir" ] || dir=homeNCG ; [ -d ~/$dir ] || mkdir -p ~/$dir ; sshfs fermi.ncg.ingrid.pt: ~/$dir ; unset -f f; }; f' alias ufermi='f(){ dir=$1 ; [ -n "$dir" ] || dir=homeNCG ; [ -d ~/$dir ] && fusermount -u ~/$dir ; [ -d ~/$dir ] && rmdir ~/$dir ; unset -f f; }; f' alias mncg='f(){ dir=$1 ; [ -n "$dir" ] && ldir=`basename $dir` ; [ -d ~/$ldir ] || mkdir -p ~/$ldir ; [ -n "$dir$ldir" ] && sshfs fermi.ncg.ingrid.pt:$dir ~/$ldir ; unset -f f; }; f' alias uncg='f(){ dir=$1 ; [ -n "$dir" ] && ldir=`basename $dir` ; ldir=`echo $ldir ; [ -d ~/$ldir ] && fusermount -u ~/$ldir ; [ -d ~/$ldir ] && rmdir ~/$ldir ; unset -f f; }; f' alias mcalo='f(){ [ -d lcalo ] || mkdir ~/lcalo ; sshfs fermi.ncg.ingrid.pt:/lstore/calo ~/lcalo ; unset -f f; }; f' alias ucalo='f(){ [ -d ~/lcalo ] && fusermount -u ~/lcalo ; [ -d ~/$ldir ] && rmdir ~/lcalo ; unset -f f; }; f'
This is how you can use it:
$ mfermi homeNCG $ df Filesystem 1K-blocks Used Available Use% Mounted on fermi.ncg.ingrid.pt: 209612800 3504112 206108688 2% /home/martinsj/homeNCG $ ufermi homeNCG $ mncg /lstore/calo ... $ uncg /lstore/calo