Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet421/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   417   418   419   420   421   422   423   424   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 322 
]
Now we're ready to roll. For SSHFS to work, we'll need a directory on both your 
local Linux machine and a remote Linux server. SSHFS can be used to mount any 
directory from the remote server you would normally be able to access via SSH. 
That's really the only requirement. What follows is an example command to mount 
an external directory to a local one via SSHFS. In your tests, make sure to replace my 
sample directories with actual directories on your nodes, as well as using a valid user 
account:
sshfs myuser@192.168.1.50:/share/myfiles /mnt/myfiles 
As you can see, the 
sshfs
 command is fairly straightforward. With this example, 
we're mounting 
/share/myfiles
 on 
192.168.1.50
 to 
/mnt/myfiles
 on our local 
machine. Assuming the command didn't provide an error (such as 
access denied
, if 
you didn't have access to one of the directories on either side), your local directory 
should show the contents of the remote directory. Any changes you make to the 
files in the local directory will be made to the target. The SSHFS mount will basically 
function in the same way as if you had mounted an NFS or Samba share locally.
When we're finished with the mount, we should unmount it. There are two ways 
to do so. First, we can use the 
umount
 command as the 
root
 (just like we normally 
would):
sudo umount /mnt/myfiles 
Using the 
umount
 command isn't always practical for SSHFS, though. The user 
that's setting up the SSHFS link may not have 
root
 permissions, which means that 
they won't be able to unmount it with the 
umount
 command. If you tried the 
umount
 
command as a regular user, you would see an error similar to the following:
umount: /mnt/myfiles: Permission denied 
It may seem rather strange that a normal user can mount an external directory via 
SSHFS, but not unmount it. Thankfully, there's a specific command a normal user 
can use, so we won't need to give them 
root
 or 
sudo
 access:
fusermount -u /mnt/myfiles 
That should do it. With the 
fusermount
 command, we can unmount the SSHFS 
connection we set up, even without 
root
 access. The 
fusermount
 command is part 
of the 

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   417   418   419   420   421   422   423   424   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish