Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet422/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   418   419   420   421   422   423   424   425   ...   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)

Filesystem in Userspace
 (
FUSE
) suite, which is what SSHFS uses as its 
virtual filesystem to 
facilitate such a connection. The 
-u
 option, as you've probably 
guessed, is for unmounting the connection normally. There is also the 
-z
 option, 
which unmounts the SSHFS mount 
lazily
. By lazily, I mean it basically unmounts 
the filesystem without any cleanup of open resources. This is a last resort that you 
should rarely need to use, as it could result in data loss.


Chapter 12
[
 323 
]
Connecting to an external resource 
via SSHFS can be simplified by adding an entry 
for it in 
/etc/fstab
. Here's an example entry using our previous example:
myuser@192.168.1.50:/share/myfiles    /mnt/myfiles    fuse.sshfs  
rw,noauto,users,_netdev  0  0 
Notice that I used the 
noauto
 option in the 
fstab
 entry, which means that your 
system will not automatically attempt to bring up this SSHFS mount when it boots. 
Typically, this is ideal. The nature of SSHFS is to create on-demand connections to 
external resources, and we wouldn't be able to input the password for the connection 
while the system is in the process of booting anyway. Even if we set up password-
less authentication, the SSH daemon may not be ready by the time the system 
attempts to mount the directory, so it's best to leave the 
noauto
 option in place and 
just use SSHFS as the on-demand solution it is. With this 
/etc/fstab
 entry in place, 
any time we would like to mount that resource via SSHFS, we would only need to 
execute the following command going forward:
mount /mnt/myfiles 
Since we now have an entry for 
/mnt/myfiles
 in 
/etc/fstab
, the 
mount
 command 
knows that this is an SSHFS mount, where to locate it, and which user account to use 
for the connection. After you execute the example 
mount
 command, you should be 
asked for the user's SSH password (if you don't have password-less authentication 
configured) and then the resource should be mounted.
SSH sure does have a few unexpected tricks up its sleeve. Not only is it the de facto 
standard in the industry for connecting to Linux servers, but it also offers us a neat 
way of transferring files quickly and mounting external directories. I find SSHFS 
very useful in situations where I'm working on a large number of files on a remote 
server but want to work on them with applications I have installed on my local 
workstation. SSHFS allows us to do exactly that.
Summary
In this chapter, we explored multiple ways of accessing remote resources. Just about 
every network has a central location for storing files, and we explored two ways of 
accomplishing this with NFS and Samba. Both NFS and Samba have their place in 
the data center and are very useful ways we can make resources on a server available 
to our users who need to access them. We also talked about 
rsync
 and 
scp
, two great 
utilities for transferring data without needing to set up a permanent share. We closed 
off the chapter with a look at SSHFS, which is a very handy utility for mounting 
external resources locally, on demand.


Sharing and Transferring Files

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   418   419   420   421   422   423   424   425   ...   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