ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

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

ความคิดเห็น • 63

  • @patrickstephens5874
    @patrickstephens5874 ปีที่แล้ว +7

    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!

  • @RavenOfLaughter
    @RavenOfLaughter ปีที่แล้ว +2

    Have come to love and use Linux daily because of this channel. You're the best.

  • @dorvinion
    @dorvinion ปีที่แล้ว +3

    That it doesn't require the server machine to have any additional configuration beyond existing SSH access is helpful

  • @privateness.network
    @privateness.network ปีที่แล้ว +4

    nice I didn't even knew it existed. Too bad about privacy though, let's hope a trustworthy maintainer will take over soon.

  • @ahacikayim1664
    @ahacikayim1664 ปีที่แล้ว +2

    Video request: How to Set Up SFTP Chroot Jail?
    And thanks for everything you did in this channel.

  • @nicoladellino8124
    @nicoladellino8124 ปีที่แล้ว +1

    Very nice video, TNX.

  • @vixxkigoli345
    @vixxkigoli345 ปีที่แล้ว

    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.

  • @virtuallifeform
    @virtuallifeform ปีที่แล้ว +3

    sshfs is incredibly useful! 🐧👍

  • @katnax3059
    @katnax3059 หลายเดือนก่อน

    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.

  • @Bob-zg2zf
    @Bob-zg2zf ปีที่แล้ว

    Jay, I'm glad you look healthy. Keep up the good work, bro!

  • @keithmiller9665
    @keithmiller9665 ปีที่แล้ว +1

    Excellent video, thank you.

  • @heckyes
    @heckyes ปีที่แล้ว

    This channel is on fire.

  • @meowcula
    @meowcula ปีที่แล้ว +9

    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?

    • @averagedev7768
      @averagedev7768 ปีที่แล้ว +2

      I was about to ask the same

    • @MrGarfield
      @MrGarfield ปีที่แล้ว

      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.

  • @Rickety3263
    @Rickety3263 ปีที่แล้ว +2

    A whole video on /etc/ssh/sshd_config would be super helpful for noobs

  • @SuijoART
    @SuijoART 8 หลายเดือนก่อน +1

    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

  • @zgliu8018
    @zgliu8018 ปีที่แล้ว

    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

  • @UKprl
    @UKprl ปีที่แล้ว +1

    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.

  • @random-drops
    @random-drops ปีที่แล้ว

    Sad as it's no longer maintained, at least to this date. Hope sb can take over it soon.

  • @G.T828
    @G.T828 ปีที่แล้ว

    Do a sysvinit tutorial too, there are not many good videos about it on the internet.

  • @dibll
    @dibll ปีที่แล้ว +2

    Could you pls create a crash course on Xargs command. Thanks!

  • @GrindAlchemyTech
    @GrindAlchemyTech ปีที่แล้ว

    💎👌

  • @AlbandAquino
    @AlbandAquino ปีที่แล้ว

    Thanks Jay for that crash course. I'll be SURE to use that in the future ! 💽

  • @JPabloDonayreQuintana
    @JPabloDonayreQuintana ปีที่แล้ว

    What about the refresh time ?
    How much time does it takes to a file to appear in the other side ?

  • @mean7429
    @mean7429 ปีที่แล้ว

    Thank you

  • @Handelsbilanzdefizit
    @Handelsbilanzdefizit ปีที่แล้ว +1

    Can it be used for PXE diskless server boot, life nfs?

  • @othernicksweretaken
    @othernicksweretaken ปีที่แล้ว +3

    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?

    • @MariuszKlinikowski
      @MariuszKlinikowski ปีที่แล้ว

      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.

  • @MaxwellsLab
    @MaxwellsLab 5 หลายเดือนก่อน

    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?

  • @send2gl
    @send2gl ปีที่แล้ว

    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

  • @madkvideo
    @madkvideo ปีที่แล้ว

    Question, why should I pick this option over SFTP?

  • @KR1ML0N
    @KR1ML0N ปีที่แล้ว

    ive used sshfs a lot

  • @byru-tech
    @byru-tech ปีที่แล้ว

    thank you just today I was looking at how to move data between two systems and 1 hour later (:

  • @johnwatson8346
    @johnwatson8346 ปีที่แล้ว

    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

  • @Alex-WW
    @Alex-WW 7 หลายเดือนก่อน

    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!

  • @becbelk
    @becbelk ปีที่แล้ว +1

    any video about CUPS and drivers in linux

  • @bhupendrasinghsuri496
    @bhupendrasinghsuri496 ปีที่แล้ว

    During mounting by sshfs it's giving an error "read: Connection reset by peer

  • @patrick-8068
    @patrick-8068 ปีที่แล้ว

    Share file​ Standard​ is​ ITU.​ 50

  • @aurorafilmproductions
    @aurorafilmproductions ปีที่แล้ว

    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?

  • @ninasmart3103
    @ninasmart3103 ปีที่แล้ว

    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.

  • @securelinuxchannel1519
    @securelinuxchannel1519 ปีที่แล้ว

    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 . ????!!

  • @MrWarneet
    @MrWarneet ปีที่แล้ว

    How would it look in Fstab?

    • @LearnLinuxTV
      @LearnLinuxTV  ปีที่แล้ว

      Convoluted. IMHO, I’d you want to use fstab, I would opt for Samba or NFS instead.

  • @raj.svc.google911
    @raj.svc.google911 ปีที่แล้ว +3

    Please stop recommending and generating RSA keys. Start using ED25519 keys instead. It is as simple as specying 'ssh-keygen -t ed25519 ...'.

  • @pepeshopping
    @pepeshopping ปีที่แล้ว

    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.

  • @BrianThomas
    @BrianThomas ปีที่แล้ว

    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.

    • @BrianThomas
      @BrianThomas ปีที่แล้ว

      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.

    • @normb2780
      @normb2780 8 หลายเดือนก่อน +1

      @@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.

  • @bhupendrasinghsuri496
    @bhupendrasinghsuri496 ปีที่แล้ว

    It gives an error : reset by peer

  • @AcidiFy574
    @AcidiFy574 ปีที่แล้ว

    Could one automate a TH-cam channel via Bash if they could ??

  • @Rickety3263
    @Rickety3263 ปีที่แล้ว

    try adding these arguments and run "ip -br -c a"
    you'll never go back

  • @richardbennett4365
    @richardbennett4365 ปีที่แล้ว

    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.

  • @joshua_lee732
    @joshua_lee732 ปีที่แล้ว +1

    Sadly sshfs has been deprecated by the developer.

  • @richardbennett4365
    @richardbennett4365 ปีที่แล้ว

    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."

  • @ovalwingnut
    @ovalwingnut ปีที่แล้ว

    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)

    • @aft3rgl0w
      @aft3rgl0w ปีที่แล้ว

      sponsorblock browser add on and you are done

    • @FHollis-gw4cc
      @FHollis-gw4cc ปีที่แล้ว

      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.

    • @ISCARI0T
      @ISCARI0T ปีที่แล้ว

      @@FHollis-gw4cc but sometimes you just need the fast version. I can recommend the indians for that, they are on turbo mode

    • @jmckey
      @jmckey 10 หลายเดือนก่อน

      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.

    • @ovalwingnut
      @ovalwingnut 10 หลายเดือนก่อน +1

      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.