最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux上通過SSH掛載遠程文件系統(tǒng)方法詳解

 更新時間:2019年03月17日 10:33:19   投稿:laozhang  
在本篇內(nèi)容里小編給大家整理了關(guān)于在Linux上通過SSH掛載遠程文件系統(tǒng)的相關(guān)知識點,需要的朋友們跟著學(xué)習下。

SSHFS的特點:

基于FUSE(Linux的最佳用戶空間文件系統(tǒng)框架)

多線程:在服務(wù)器上可以有多個請求

允許大讀?。ㄗ畲?4k)

緩存目錄內(nèi)容

步驟1:安裝fuse-sshfs

對于centos/rhel用戶,fuse sshfs在epel repository下可用,因此請確保在系統(tǒng)中安裝了epel repository?,F(xiàn)在執(zhí)行以下命令安裝它

在CENTOS/RHELL上:

#yum install fuse-sshfs

在Ubuntu和Dabian上:

$ sudo apt-get update

$ sudo apt-get install sshfs

步驟2:裝載遠程目錄

讓我們使用sshfs掛載遠程服務(wù)器目錄,確保遠程系統(tǒng)運行的ssh服務(wù)器與系統(tǒng)的ssh連接正確。

首先創(chuàng)建裝入點

# mkdir /mntssh

讓我們掛載遠程目錄。對于本例,我們將把/home/remoteuser目錄從192.168.1.12(remote.example.com)系統(tǒng)安裝到本地系統(tǒng)。

# sshfs laitkor@remote.example.com:/home/remoteuser /opt/mntssh

樣本輸出

The authenticity of host 'remote.example.com (192.168.1.12)' can't be established.

RSA key fingerprint is 77:85:9e:ff:de:2a:ef:49:68:09:9b:dc:f0:f3:09:07.

Are you sure you want to continue connecting (yes/no)? yes

remoteuser@remote.example.com's password:

步驟3:驗證安裝

在本地掛載點上掛載遠程文件系統(tǒng)后,通過運行mount命令進行驗證。

# mount

 

/dev/mapper/vg_svr1-lv_root on / type ext4 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620)

tmpfs on /dev/shm type tmpfs (rw)

/dev/sda1 on /boot type ext4 (rw)remoteuser@remote.example.com:/home/remoteuser on /mntssh type fuse.sshfs (rw,nosuid,nodev)

同樣導(dǎo)航到你的掛載點,將從遠程系統(tǒng)中看到文件

# cd /mntssh

# ls

步驟4:在系統(tǒng)引導(dǎo)時掛載目錄

如果要在每次系統(tǒng)重新引導(dǎo)時自動掛載遠程文件系統(tǒng),請在/ etc / fstab文件中添加以下條目。確保在遠程和本地系統(tǒng)之間安裝了基于密鑰的ssh。

remoteuser@remote.example.com:/home/remoteuser /mntssh fuse.sshfs defaults 0 0

步驟5:卸載目錄

如果您的工作結(jié)束并且您不再需要已安裝的目錄,則只需使用以下命令卸載。

#umount / mntssh

您可能感興趣的文章:

相關(guān)文章

最新評論

浦城县| 金塔县| 新营市| 疏附县| 防城港市| 阜城县| 辉县市| 伊川县| 威海市| 通化市| 凯里市| 河池市| 出国| 万全县| 望谟县| 泽普县| 宣城市| 浦东新区| 星座| 大兴区| 鄂尔多斯市| 施秉县| 阿荣旗| 宣化县| 临邑县| 永登县| 九江市| 昔阳县| 巨鹿县| 景谷| 武义县| 揭阳市| 紫云| 尤溪县| 泰兴市| 尉氏县| 大英县| 当涂县| 龙岩市| 浦城县| 沁阳市|