sibuser: (Default)
2012-11-05 04:24 pm

Mount folder via sshfs.

Каждый раз, как мне надо было обновить данные на сервере, юзал команду scp. Это требовало некоторого времени и внимательности, чтобы не затереть нужные данные.
Решив немножко оптимизировать свою работу, разобрался как смонтировать на локальный комп удаленный каталог.
Теперь можно работать на прямую и это экономит уйму времени.

Connecting to a server across the internet is much more secure using SSH. There is a way that you can mount a folder on a remove server using the SSHFS service.

First we’ll install the module:

sudo apt-get install sshfs

Now we will use the modprobe command to load it

sudo modprobe fuse

We’ll need to set up some permissions in order to access the utilities. Replace <username> with your username.

sudo chown root:fuse /dev/fuse

sudo chmod +x /dev/fusermount

Now we’ll create a directory to mount the remote folder in.

mkdir ~/remoteserv

Now we have the command to actually mount it. You’ll be prompted to save the server key and for your remote password.

sshfs <username>@<ipaddress>:/remotepath ~/remoteserv