トップ(最新)

nDiki

2004年2月4日 (水)

[ Debian ] shfsSSH接続されたリモートホストのディレクトリをマウント このエントリーを含むはてなブックマーク

試してみる。 Linux kernel モジュールになるので、現在しようしているカーネルをビルドしたディレクトリ下で作業。

 su
 apt-get install shfs-source shfs-utils
 exit
 cd /usr/local/src/linux
 tar jxvf /usr/src/shfs.tar.bz2
 cd kernel-source-2.4.22
 MODULE_LOC=/usr/local/src/linux/modules fakeroot make-kpkg modules_image
 cd ..
 su
 dpkg --install shfs-module-2.4.22_0.32-2+sebastian.1.6_i386.deb

@ マウントしてみる

ノート PC から naney ユーザでリモートホストに接続する。 ローカルも naney.naney (1000.1000)権限で見えるようにする。 root で

 shfsmount naney@www.naney.org /mnt -o uid=1000,gid=1000,rw,nocache
 ls /mnt
 shfsumount /mnt

公開鍵認証できるようにしているので、パスフレーズ無しで接続できる。

mount コマンドだと、

 mount -t shfs naney@www.naney.org /mnt -o uid=1000,gid=1000,rw,nocache
 ls /mnt
 umount /mnt

@ autofs + shfs

autofs で自動的にSSH接続しマウントするようにしてみる。

/etc/auto.misc に以下の行を追加

 naneyorg -fstype=shfs,uid=1000,gid=1000,rw,nocache :naney@www.naney.org

でテスト。

 /etc/init.d/autofs restart
 ls /var/autofs/misc/naneyorg

OK。

@ 自動的にアンマウントしない?

タイムアウト時間を過ぎてもマウントされっぱなしのようだ。

スポンサード リンク


[ 2月4日全て ]

Related term

■よく検索されるキーワード

torrent(173) expressions(80) 竹内まりや(58) x31(25) ドラマ(23) linux(23) 手帳(21) 壁紙(21) perl(21) windows(20) 動画(19) wiki(17) porter(17) debian(16) 使い方(16) 画像(15) thinkpad(15) 作り方(15) gmail(14) usb(14) 秋葉原(13) ヨドバシ(13) ほぼ日手帳(13) 提案書(12) 活用(12) 竹内(12) 古川小百合(12) 修理(12) ノート(11) 無印(11) ヨドバシカメラ(11) nikon(11) 書き方(10) ダイソー(10) 万年筆(10) 生年月日(10) 大井町(10) ミニ6穴(9) ほぼ日(9) tc-1(9) 冷蔵庫(9) 設定(9) ニコン(9) java(9) mp3(8) 故障(8) 方眼(8) xp(8) 日誌(8) 感想(8) カメラ(8) allinanchor:*.torrent(8) バッグ(8) firefox(7) インストール(7) キーボード(7) mixi(7) 無料(7) リフィル(7) 小林麻耶(7) nikkor(7) ジョイントラック(7) madwifi(7) 原田夏希(7) skype(6) 変更(6) 三条まゆみ(6) ペンケース(6) web(6) emacs(6) home(6) ポーター(6) 2009(6) itunes(6) a6(6) 無印良品(6) デジカメ(6) finepix(6) 無線lan(6) 評判(6)

この日記のはてなブックマーク数 Add to Google RSS

Process Time: 1.097316s / load averages: 0.81, 1.97, 1.75
nDiki by WATANABE Yoshimasa (profile)
Powered by DiKicker
Base theme by Nana (for tDiary)