 So a few weeks ago, I made a video about Samba and how it is not, you know, the greatest and I stand by that. I think that while Samba theoretically is very, very good, the implementation of it is kind of crap. And in the comments of that video, I received many comments like hundreds of comments just saying Matt, don't use Samba. There were many different suggestions over what I should use, but primarily the one that came up the most was SSHFS. Now I had heard of this, Brody made a video about it a while back and I know DT had made a video about it. So I heard of this, but I never actually looked into it. And I put it on my list of things to do and put it in a browser tab, in other words. And I decided that I would eventually come back to it and actually take a look at it. And I finally have had a chance to do so and I wanted to make a video about it. I want to show you how it works and everything that goes into actually setting it up. So that's what we're going to do today. But first, before I jump into it, I just want to point out that this project has been abandoned. It's unfortunate because it's actually fantastic. It's like life changingly good, but it is no longer being developed. So if that's something that bothers you, just stop here. You don't need to continue on. It does still work is where it is at right now. As of the time I'm recording this video, SSHFS still works fine on every distro that I've tried it on, which entails Gentoo and Ubuntu and Debian. So those three distros, it still works just fine on. So you should still be able to use it, even though it's no longer being developed. So now that that's out of the way, let's go ahead and jump in to begin with before we get started on the how to. Let's talk about what SSHFS actually is at the base level most simplest explanation, SSHFS is simply the ability to use SSH to mount a remote file system on a host. So for example, and the example I'm going to be using in this tutorial, I'm going to be mounting the file system of this VM, which you're staring at on screen right now, which is a Debian VM, I'm going to mount that on my host main machine, the machine that I use as a daily driver that has Redcore on it. The idea here is that you'll have the file system of the remote server on your main machine where you can access it and transfer files to and fro whatever you need to do. And it just acts like a file or directory on your system as if it's always been there. It's really quite cool and you'll see more what I'm talking about as I actually set this up. So how do you do that? So first, you're going to need a terminal. So open up a terminal. This is console. It doesn't really matter what terminal you're using, whatever your favorite terminal is. And you're going to need to on the server machine. And when I say the server server machine, I mean the machine or the distro or whatever that you're going to want to mount on your main machine. So this is going to be the source of all the files. On that machine, you're going to want to install open SSH server. Now depending on what distribution you're on, this is going to be a different package name. On Debian and Ubuntu, you want to do sudo apt install open SSH dash server. On Arch, you would do sudo pacman dash s open SSH. Open SSH on Arch includes both the client and the server. I'm pretty sure that's the case on Gen2 as well, but don't quote me on that. I'm not sure. There's a good chance that you probably already have open SSH of some flavor on your machine already. But if it's not there, you'll have to install it. Like I said, on Ubuntu or on Debian, in this case, we're going to do sudo apt install open SSH dash server. And then we'll press enter, enter your password, like so it's going to do that it will install very quickly. It's not very big. It just takes a second. And once that's done, the next thing you'll want to do is enable the service and start the service of SSH. So in this case, what we're going to do is do sudo system CTL and start SSH D enter. And you won't have any output for that from that, if it went through just fine. Now the next part here is going to be different than what it used to be from what I can tell my initial tutorial on this came from distro tube. And he said in his video to do sudo system CTL enable SSH D. But if I do that here, you'll see I get a failed to enable unit error. And I'm still not sure what this actually is from what I can tell I have something to do with symbolic links or something like that. I don't know. But the solution from what I from what I've been able to find is just to remove the D and replace it with dot service like so. And that's going to enable the SSH service so that you can connect to it. Now that should have the server of SSH of open SSH running on your system. And you shouldn't have to restart or anything because we started that in this line here. So we're almost done now with the server side implementation of SSH FS. All you have to do next is find the IP address and you can do that by doing IP ADDR. You're going to have to spell it right, which I can't seem to do now. If you're new to Linux, this probably looks like a bunch of gobbledygook. It kind of is most of it you can just flat it out. What you're going to need is this IP address right here and you can just copy that. And then we what we need to do next is actually leave the machine that we're on right now and go to our main machine. So I'm going to go to another workspace here. I'm going to enter and I'm going to open up a terminal. And now what we need to do is create a mount point. So on your main machine where you want to mount the file system, what you're going to want to do is create a directory where you can mount the file system of the remote machine. So in this case, you can do it pretty much anywhere. A lot of people want you to do it in slash MNT. I'm going to go ahead and do it in slash MNT because that's where I've kind of just been doing it, but you can mount it basically anywhere. So I'm going to CD into slash MNT. And if we do analysts here, you'll see I have some files here that I've already shared or that I've already created. And what we want to want to do now is do pseudo because we're in the root directory somewhere. So we're going to need pseudo privileges. And then we're going to want to do is create a directory of some kind. In my case, the VM that I've just shown you a few seconds ago is my main VM where I do most of my work. So I'm just going to call this main. Like, except for I got to do make directory main, basically, we're just creating a directory where we can mount. So we're going to do that. It'll ask us for a password. And then if we do an alas here again, you can see that there's now a main directory. Now there's one other thing we need to do before we mount the SSHFS. We need to change the ownership of main. Now this only is required if you're creating a directory in slash MNT. If you've created inside your home directory, you can skip this step because you already own that directory. In this case, if we do this, you can see that the ownership of main just right here is actually root. So what we need to do is change that to my user. So I'm going to do pseudo CH own my user name and then colon my username again and then the name of the directory. So in this case, just like that, there should be no output as long. And if we do LSA again, we can see that main is now owned by Dr. Mdub, which is my username. I think I pointed to the wrong one up here when I was talking about this. You can see what it was owned by root. Now it's owned by Dr. Mdub. I'm not sure why EXA does things in columns. That's just that that really messed with my brain there for me. But it doesn't matter. Anyways, now that we have the proper ownership, now we can mount our file system. It's really quite simple. So if you ever need to know what the syntax for SSHFS is, you can use the man page. I actually completely passed over installing SSHFS, which I probably should, you know, actually show you because it's really simple. Just do pseudo just do if you're on arch to pseudo Pacman dash s and then SSHFS. If you're on Ubuntu, it's apt install SSHFS and you want to install SSHFS on the machine where you're going to be mounting the directory. It doesn't need to be on the server side. It needs to be on the client side. In my case, if you're I think I'm on Gen2 based distro, I do pseudo emerge dash AV and then SSHFS, I probably would need the category to in order to do that. But I don't really have. I don't remember what that was. So you do need to install SSHFS. It's probably not installed on your system. So I apologize for, you know, doing things out of order. But anyways, once you have SSHFS installed, you can then go to man SSHFS. And you can see that the syntax to mount a file system is right here. Now what we're going to actually do is I'm going to open up another terminal here. I'm going to CD back into mount just so we can we can be there and we can see that we have our main directory there. So what we're going to want to do is do this. So we're going to do SSHFS and then we're going to be you're going to need the username of the server that you want to mount. So in this case, my username on that machine is Matt, then you're going to do an app symbol and you're going to paste the IP address that we found earlier, which is there. And then what you're going to want to do is do colon. And then you're going to want to give the directory that you want to mount. So you can just do root if you want access to everything. Or in my case, I'm going to do slash home slash Matt, that's just going to give me the home directory. That's really all I need on that VM. And then you're going to want to give it the full path to the mount point that we created in this case, it's slash mnt slash main and then enter. Now you do have to have SSH set up on your machine in order for this to work. I'm not going to cover that. So if you don't have SSH set up, I highly recommend going to check out either DT's or any other Linux YouTubers tutorial on how to set up SSH. It's not that hard, but I don't have a video on it myself. Maybe someday I'll actually do that. I can't explain it very well. That's the reason why I haven't made one yet. But anyways, if you have SSH set up properly, you'll probably get a warning that looks like this. Are you sure you want to continue connecting? Just type in the word yes. And then it's going to ask you for the password to the machine you want to connect to. So I'm going to enter my password and then we're done. Now, if we do an LS here, we still have main, we'll CD into main like so. And if we do an LS here, those files are on that remote VM that I just showed you. So if we go to that particular VM, open it back up and get into full screen. I'm going to do an LS here and we're going to do make directory test. Now if we go back to my main machine, like so, and we do an LS here, we can actually see that there's now a directory that we just created on that other machine called test. And this is mounted on my main machine. Those two machines are now connected. I can transfer files to and fro. I can do whatever I need to do. And it's just absolutely amazing. It works fantastically. It's not overly complicated, given the fact that I was able to do it. It's very, really very good. Probably the biggest hurdle is going to be setting up SSH, which I didn't show you in this video. I probably should have started off with that and tried to actually cover that. But again, search out one of those tutorials, it should get you there. It's fairly simple. It's just a couple commands. So now that I have all of those files mounted on this machine, I can do basically whatever I want. And to unmount them, I do f u s e r m o u n t dash u slash m n t slash main. And that would unmount the server from this machine. And I'd no longer have access to those files. Now there's a couple of other things that you'll want to do. Now there's a couple of things that you'll want to keep in mind. First, you will have to run this command or, you know, with your IP address and all that stuff every time you want to connect. Especially at the beginning of your session, especially if you're connecting to a machine that's not always on. So like my VM is not always on. So when I turn that on, I would have and I'd have to come back and rerun this command. Now, if you're the machine you're connecting to is always on, you can add this to your FS tab. So if we open up another terminal here, actually, we can close this part here. And we do pseudo and Vim slash Etsy FS tab, like so, you can add something that looks like this. So you'll want to copy and paste this line here, but you actually need the entire was it was just type it. I think it's going wrong there. I don't know what's going on there. So we do SSH FS, and then the username at the 192.168.122.58 colon slash home slash Matt, and then slash MNT slash main, which is the mount point. And then you're going to want the file system, just like you have, like I have up here with all my other drives that I connected startup. And then you can just do type SSH FS, that is the file system, it doesn't need any of the other stuff, you don't need to add defaults or any of the zeros, it should work just fine. Now again, this is only going to work if the drive exists. So don't do this on a VM that doesn't start up at startup. And I wouldn't even do it on a VM that starts up a startup because you don't know the order of the things are going to start up. So there's a good chance that the FS tab is going to get executed before your VM starts up. And then you're going to have some issues. So don't put this, don't put this in your FS tab unless you know that machine is already on already running already has SSH up and running, all that stuff, right? Only put this in your FS tab, if that is all true, if it's not, don't do this. I don't think that I don't think that if it's there, and it's not like available, I don't think that it's going to break anything. But you don't want to risk it right and just just start it up from the terminal like you normally would. So that is SSH FS. And honestly, I think that this may be the best tool that I've found in ages. And the folks who left comments on that initial video about Samba, thank you for doing that. Even though at the time I found it super annoying because like everyone said, Matt, try SSH FS. There's like a hundred comments, SSH FS, SSH FS, SSH, I get it guys, just read other people's comments. I know the other people have recommended it, but you're all right. It's awesome. I am highly disappointed that it's not being maintained anymore. I hope someone else picks it up because it is fantastic. I don't want it to die. Usually when a project like this gets abandoned, it eventually breaks. And that just makes everybody sad. I'm hoping somebody else will pick it up and actually continue to develop it so that doesn't die. But as of right now, it's still works, and I'm going to be happy until it, you know, stops working. So that is it for this video. If you have questions or comments, you can leave those in the comment section below. I'd love to hear from you. I apologize for the, you know, things not being in order. I should have covered the installation, you know, at the beginning of the video instead of halfway through. But, you know, you know me. Anyways, that's it for this video. You can follow me on MasterDown or Odyssey. Those links will be in the video description. You can support me on Patreon at patreon.com slash the Linux cast. Links for Liberapay and YouTube will be in the video description as well. Thanks to everybody who does support me on Patreon and YouTube. You guys are all absolutely amazing. You know, that's you, the channel is not going to be anywhere near where it is right now. So thank you so very, very much for your support. I truly do appreciate it. You guys are all awesome. Thank you so much for your support. Thanks to everybody for watching. I'll see you next time.