sshfsとはsshプロトコルで相手ホストのファイルシステムをマウント出来るようにしたもので、sshさえ通じればファイルの読み書きができる簡単且つセキュリテイも満たしたすぐれものです(^_^)
適当なマウントポイントを作成
[root@~]# mkdir t
fuseモジュールをロードします
[root@~]# modprobe fuse
相手ホストの / をマウントします
[root@~]# sshfs 192.168.0.250:/ t
root@192.168.0.250's password:
[root@~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/tmpfs 193536 51016 142520 27% /
/dev/hdc 166540 166540 0 100% /cdrom
none 128268 136 128132 1% /dev
/cdrom/USR 143360 143360 0 100% /usr
192.168.0.250:/ 1048576000 0 1048576000 0% /root/t
[root@~]# ll t/
total 128
drwxr-xr-x 1 root root 1940 Jun 28 20:53 bin
drwxr-xr-x 1 root root 40 Nov 8 19:11 BIN+
drwxr-xr-x 1 root root 220 Nov 8 19:12 boot
drwxr-xr-x 1 root root 2048 Jun 28 22:15 cdrom
~ 中略 ~
drwxr-xr-x 1 root root 40 Sep 1 2004 tmpfs
drwxr-xr-x 1 root root 40 Jul 1 2007 UNIONFS
drwxr-xr-x 1 root root 209 Jan 30 2008 usr
drwxr-xr-x 1 root root 40 Nov 8 19:11 usr+
drwxr-xr-x 1 root root 480 Nov 8 10:13 var
[root@~]# mkdir t/work
[root@~]# ll t
total 132
drwxr-xr-x 1 root root 1940 Jun 28 20:53 bin
drwxr-xr-x 1 root root 40 Nov 8 19:11 BIN+
drwxr-xr-x 1 root root 220 Nov 8 19:12 boot
drwxr-xr-x 1 root root 2048 Jun 28 22:15 cdrom
~ 中略 ~
drwxr-xr-x 1 root root 40 Sep 1 2004 tmpfs
drwxr-xr-x 1 root root 40 Jul 1 2007 UNIONFS
drwxr-xr-x 1 root root 209 Jan 30 2008 usr
drwxr-xr-x 1 root root 40 Nov 8 19:11 usr+
drwxr-xr-x 1 root root 480 Nov 8 10:13 var
drwxr-xr-x 1 root root 40 Nov 9 16:34 work
[root@~]#
適当なマウントポイントを作成
[root@~]# mkdir t
fuseモジュールをロードします
[root@~]# modprobe fuse
相手ホストの / をマウントします
[root@~]# sshfs 192.168.0.250:/ t
root@192.168.0.250's password:
[root@~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/tmpfs 193536 51016 142520 27% /
/dev/hdc 166540 166540 0 100% /cdrom
none 128268 136 128132 1% /dev
/cdrom/USR 143360 143360 0 100% /usr
192.168.0.250:/ 1048576000 0 1048576000 0% /root/t
[root@~]# ll t/
total 128
drwxr-xr-x 1 root root 1940 Jun 28 20:53 bin
drwxr-xr-x 1 root root 40 Nov 8 19:11 BIN+
drwxr-xr-x 1 root root 220 Nov 8 19:12 boot
drwxr-xr-x 1 root root 2048 Jun 28 22:15 cdrom
~ 中略 ~
drwxr-xr-x 1 root root 40 Sep 1 2004 tmpfs
drwxr-xr-x 1 root root 40 Jul 1 2007 UNIONFS
drwxr-xr-x 1 root root 209 Jan 30 2008 usr
drwxr-xr-x 1 root root 40 Nov 8 19:11 usr+
drwxr-xr-x 1 root root 480 Nov 8 10:13 var
[root@~]# mkdir t/work
[root@~]# ll t
total 132
drwxr-xr-x 1 root root 1940 Jun 28 20:53 bin
drwxr-xr-x 1 root root 40 Nov 8 19:11 BIN+
drwxr-xr-x 1 root root 220 Nov 8 19:12 boot
drwxr-xr-x 1 root root 2048 Jun 28 22:15 cdrom
~ 中略 ~
drwxr-xr-x 1 root root 40 Sep 1 2004 tmpfs
drwxr-xr-x 1 root root 40 Jul 1 2007 UNIONFS
drwxr-xr-x 1 root root 209 Jan 30 2008 usr
drwxr-xr-x 1 root root 40 Nov 8 19:11 usr+
drwxr-xr-x 1 root root 480 Nov 8 10:13 var
drwxr-xr-x 1 root root 40 Nov 9 16:34 work
[root@~]#