ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Linux Crash Course Series - How to Share Files via SSHFS
ฝัง
- เผยแพร่เมื่อ 16 ส.ค. 2024
- While technologies such as Samba and NFS are very effective when you want to share files with other users, those solutions may not be best for those with simpler file sharing needs. In this video, sshfs is covered, which is a fuse-based solution that enables you to quickly share directories on your network.
Note: sshfs no longer has a maintainer, so don't use this solution for confidential or proprietary files. Check out the repository and consider volunteering to maintain this solution ➜ github.com/lib...
Thanks to Linode for sponsoring this video. Support LearnLinuxTV and spin up your very own Linux server ➜ learnlinux.lin...
🎓 CROWDSTRIKE CRASH SURVIVOR T-SHIRT
Commemorate the largest outage in history with the latest addition to the LLTV merch shop.
Get yours here ➜ learnlinux.lin...
🎓 BRAND NEW UDEMY COURSES AVAILABLE!
Check out my new courses on Udemy and learn something new!
• Getting Started with Ansible ➜ learnlinux.lin...
• LPI Linux Essentials Complete Workshop ➜ learnlinux.lin...
🐧 SUPPORT LINUX LEARNING!
• Grab some Linux swag ➜ merch.learnlin...
• Become a Channel Member ➜ learnlinux.lin...
• Become a Patron ➜ learnlinux.lin...
• 5% discount on LPI exam vouchers ➜ learnlinux.lin...
• Check out my latest book ➜ ubuntuserverbo...
• Grab an awesome Pi-powered KVM ➜ learnlinux.lin...
• Jay's Gear - Server, Computer and Video Production Stuff ➜ learnlinux.lin...
Note: Royalties and/or commission is earned from each of the above links
⏰ TIME CODES
00:00 - Intro
01:44 - Grab your very own Linux server through Linode (sponsor)
03:38 - What is "sshfs" and what is it used for?
05:21 - Lab setup notes
06:17 - How to install sshfs
07:18 - Examples of sshfs in action
07:50 - Testing ssh access before attempting to use sshfs
08:26 - Creating the directories that we'll use with sshfs
09:57 - How to mount a directory using sshfs
13:10 - Unmounting an sshfs directory with fusermount
14:45 - Creating an ssh key to simplify sshfs mounting
17:58 - There's a bit of a problem with sshfs (and how you can help)*🎓 FULL LINUX COURSES FROM LEARN LINUX TV*
• Linux Crash Course ➜ linux.video/cc
• Learn tmux ➜ linux.video/tmux
• Learn vim ➜ linux.video/vim
• Bash Scripting Series ➜ linux.video/bash
• Proxmox VE ➜ linux.video/pve
• Getting Started with Ansible (Udemy) ➜ learnlinux.lin...
• LPI Linux Essentials Workshop (Udemy) ➜ learnlinux.lin...
🌐 LEARN LINUX TV ON THE WEB
• Main site ➜ www.learnlinux.tv
• Community ➜ community.lear...
• Official Github Account ➜ github.com/Lea...
• Enterprise Linux Security Podcast ➜ enterpriselinu...
• The Homelab Show Podcast ➜ thehomelab.show
• Jay on Udemy ➜ www.udemy.com/...
• Jay on Twitter ➜ x.com/JayTheLi...
• Content Ethics ➜ www.learnlinux...
• Request Assistance ➜ www.learnlinux...
⚠️ DISCLAIMER
Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. Always make sure you have written permission before working with any infrastructure and that you are compliant with all company rules, change control procedures, and local laws.
#DevOps #ssh #sshfs
LINUX CRASH COURSE BABY!
I love these videos Jay! They have really helped me out so much on my Linux journey. You really make this stuff fun and easy to grasp. I recommend your channel to all my friends who are interested in Linux and Homelab.
Thanks Jay!
Have come to love and use Linux daily because of this channel. You're the best.
That it doesn't require the server machine to have any additional configuration beyond existing SSH access is helpful
nice I didn't even knew it existed. Too bad about privacy though, let's hope a trustworthy maintainer will take over soon.
Video request: How to Set Up SFTP Chroot Jail?
And thanks for everything you did in this channel.
Very nice video, TNX.
Very helpful video it was.
I have compiled/ported postmarketOS on my android device.
I have used ssh to run commands via my desktop to my android device, but wasn't aware of sshf, so everytime I switch off [hone and then go to recovery and then place file via adb.
But after your video, I get an Idea of sshf, now I will use it, no more reboot.
Thank You Very Much.
sshfs is incredibly useful! 🐧👍
I like those videos but I expected a bit more.
Like how to mount over internet. Like when you create Linode cloud server and mount a directory over SSH to your workstation.
What about different ssh ports, what about permissions, adding to fstab, automounting on boot on LAN and WAN, troubleshooting, like recently I couldn't unmount sshfs directory and I had to use lazy unmount, and other edgecases.
You can ask your community when planning those videos, on what issues they had with simmilar things.
Jay, I'm glad you look healthy. Keep up the good work, bro!
Excellent video, thank you.
This channel is on fire.
Thanks Jay, most useful as always. I wonder why do you only recommend it for one-off mounts for the task at hand? or why you'd prefer NFS/Samba for mounts that are meant to be up all the time? (ignoring the lack of maintainer for the moment). Seems simple enough to make an sshfs mount into a systemd daemon to mount it, or put it into one's fstab. Are there any drawbacks to doing so?
I was about to ask the same
Yes there are some issues with auto-mounting. Because if the server side is down you have to remount it. However you can fix this by adding additional mount options like timeout / remount etc... i'm using it for years now and love it not every time running exports for nfs , and a big plus, if the server goes down the mount is unmounted and not hanging your file-browser.
A whole video on /etc/ssh/sshd_config would be super helpful for noobs
Thanks Jay for the video guide ! It was very helpful 😃 ; Quick question : is it a way to automount remote directory with SSHFS by including it in the /etc/fstab file
A lot of people with Steam Deck sleep on sshfs, instead using GUI programs like warbinator or whatever that requires to go to desktop mode and needs manual control on both ways. SSHFS is simply a better choice, it doesn't require going to desktop mode, doesn't need extra configuration other than SSH, and allows you to perform file operations directly at client
Weird, I made an uncontroversial comment asking how this method compares with typing SFTP URLs in our file manager (i.e. GVFS/GIO in Gnome, KIO in KDE). This was in light of SSHFS having no maintainer, and it seems to achieve broadly the same result without needing to manually create the local directory mount point oneself.
Only requires SSH service defaults on the server side (as with SSHFS) and no additional client side software.
The first comment was silently deleted while I had it open for an edit (Google reference error), so I recomposed it but the replacement also disappeared within 24 hours. There weren't any web links etc that might trigger a moderation queue.
If this one vanishes too I will probably just give up posting here. I've seen it happen on other channels occasionally.
Sad as it's no longer maintained, at least to this date. Hope sb can take over it soon.
Do a sysvinit tutorial too, there are not many good videos about it on the internet.
Could you pls create a crash course on Xargs command. Thanks!
💎👌
Thanks Jay for that crash course. I'll be SURE to use that in the future ! 💽
What about the refresh time ?
How much time does it takes to a file to appear in the other side ?
Thank you
Can it be used for PXE diskless server boot, life nfs?
Jay, you mentioned possible security issues in the future as the sshfs's maintainer abandoned it.
But what about data integrity?
While NFS has a locking mechanism which prevents that files are corrupted by simultaneous write access from different hosts how is SSHFS comparing in this regard, or are its users expected to take care that simultaneous write accesses are by all means avoided?
Security issues have very poor chance to appear, because if something bad will be found inside ssh - it will be fixed. It's just overlay.
Data integrity is even better in case of sshfs, especially because it can reconnect, does not hand like NFS does and do not have those locking problems. It's just slow when your connectivity is bad. SSHFS does not have special locking in case of multiple hosts trying to modify the same file, so expect a mess in this case.
So we can't mount system directories unless we can ssh as root. However, its bad practice to allow logging into root as ssh. Sudo doesn't do anything while inside a mounted ssh directory either. So...what's the best practice in this situation?
That was interesting, shame not maintained at the moment. I often mount various Raspberry-Pi devices on my network using Dolphin or Nautilus, pretty sure that is set up using ssh or scp
Question, why should I pick this option over SFTP?
ive used sshfs a lot
thank you just today I was looking at how to move data between two systems and 1 hour later (:
hi i have setup a PBX server with key and use sshfs but when mounted the directory only has these privileges (drwxrwxr-x) but I cannot delete or copy or create how do I sort this please
if I'm working with a folder of size some 10GB is this best possible solution? I'm using a linux machine to build the code but I wanted to browse the code using VS code instead of VIM on the linux machine VM, so could you help me how do I do that? VIM is very tedious to browse through functions callers/references whereas VS give all the references for me so please suggest, Thanks!
any video about CUPS and drivers in linux
During mounting by sshfs it's giving an error "read: Connection reset by peer
Share file Standard is ITU. 50
Great video, as all your other videos. Thanks so much.
I wonder if there is any way of having a mount from my server with fallback on another mount (say local mount)
I have some configuration files in my ASUTOR server mounted locally at /mnt/CONFIG. Sometime I need to restart the ASUSTOR NAS and would like the mount to fallback on a local folder… say ~/config_fallback Is this possible?
I enjoy your videos, they have helped me in my journey to learning Linux. I was wondering if this process will work for sharing Windows storage space drives that I attached via USB. When I lslbk I can see the 2 storage pools that I have (12 drives) but I am unable to mount to share it.
can you make a video on linux normal release and LTS release . what are the advnatages and disadvantages both the releases or which release you preffer . ????!!
How would it look in Fstab?
Convoluted. IMHO, I’d you want to use fstab, I would opt for Samba or NFS instead.
Please stop recommending and generating RSA keys. Start using ED25519 keys instead. It is as simple as specying 'ssh-keygen -t ed25519 ...'.
It’s cool but there are only a few cases where SCP would not be enough, and I simply use NFS then, so I have never used or needed sshfs.
Help. I'm connected as a user with sudo rights and when I create my directory on both sides. After I mount the directory as shown. I lose privileges. Root has ownership of both directories. It gets stranger, because when I try to chown and chmod as su or root I'm denied access even though it's owned by root.
I really like sshfs but if I can't get around this issue. I won't be able to use it.
when I place data in the directory on the remote side or server side. It looks like I'm only able too add data to the directory in one direction. Only frombthe far end or the server side. I can only view data on the client side, but that's where everything was created. So confusing.
@@BrianThomas I wanted to be able to add files both ways and discovered that using -o allow_other and uncommenting allow_other in /etc/fuse.conf, I was able to do so.
It gives an error : reset by peer
Could one automate a TH-cam channel via Bash if they could ??
try adding these arguments and run "ip -br -c a"
you'll never go back
Nice, but long. Also, the narrator can pronounce fusermount as eff user mount, but it's a FUSE tool that deals with remote mounting, so I think a better pronunciation is fuse arr mount. But, it's the same as people saying eff stab or eff ess tab. Chris Titus says eff stab. Funny. It's not a stab of something. It's a table of file systems. So, tab is an abbreviation for table, line file system table. But eff stab is humorous. Toe may toe and toe mah toe. Chacun a son goût.
Sadly sshfs has been deprecated by the developer.
Dry sense of humor.
Anyway, the narrator pronounced fusermount. But, it seems this command is related to FUSE. SO, it's curious he pronounced the command as "eff user mount."
One might think it's better as "fuse arr mount."
3+ mins of commercials. 8mins in and we still haven't run sshfs? Face palm. Life is to short. Cheers! I'm outa here.... (thumbs up for the effort)
sponsorblock browser add on and you are done
Cheap price to pay (nothing but a few minutes of your time) if you're wanting to learn something. Especially by someone who goes slow enough and thorough enough to absorb to content.
@@FHollis-gw4cc but sometimes you just need the fast version. I can recommend the indians for that, they are on turbo mode
He's got chapter markers, so on mobile you can just double tap with two fingers or on PC click on the next chapter. Or am I misunderstanding what commercials you mean? I'm guessing you mean the Linode sponsorship he reads in himself.
JM, thank you for that logical and informative reply. You are a gentleman and a scholar. I guess my hidden agenda is that I now use YT Premium and I didn't factor in that commercials would still continue (in some form). Like death & taxes.. it's inevitable. My bad. And I do apologize for going off to soon (which happens to be the same thing my ex-GF complained about) :O\ You RoCk. Cheers.