SSHFS

Published 01-01-0001 00:00:00

Installing sshfs on Gentoo or Calculate

Installing the stable version:

sudo emerge -av net-fs/sshfs

After that create a mount point and set it as the owner of your user:

sudo mkdir -p /mnt/sshfs/kronoz.web
sudo chown KronoZ /mnt/sshfs/kronoz.web

And after that, we connect to the remote server:

sshfs kronoz@web:/home/kronoz /mnt/sshfs/kronoz.web

If you use keys for authorization, then the command will look like:

sshfs -o IdentityFile=~/.ssh/id_rsa kronoz@web:/home/kronoz /mnt/sshfs/kronoz.web

If you do not use the standard port for ssh, you can add the -p switch to the port number, that is, the command will look like:

sshfs -p 777 -o IdentityFile=~/.ssh/id_rsa kronoz@web:/home/kronoz /mnt/sshfs/kronoz.web

For automatic mounts, you need to add a line in a file /etc/fstab:

sshfs#kronoz@web:/home/kronoz /mnt/sshfs/kronoz.web fuse defaults,idmap=user,port=777,allow_other,reconnect,_netdev,users,identityfile=~/.ssh/id_rsa 0 0

After that execute the command:

sudo mount -a

Unmounting is done as usual:

sudo umount /mnt/sshfs/kronoz.web