Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "sshfs"
Another story from that dev friend of mine:
So a client(small company) of theirs insisted on having their own local servers for their web hosting(no idea why). So my friend's company sets it up(after the website was done).(This was on Tuesday.)
The next weekend they(friend's company) gets an urgent support ticket saying the website is down.
(24/7 support is part of their contract/)
My friend gets tasked with that ticket.
And indeed it's down, ssh access to the server doesn't work either.
He calls up the client's CEO(again, small company, no other contact person) and asks him to restart the server. This guy then drives to their warehouse. As soon as he has restarted them(as instructed) the site works again.
My friend then tries to access the server logs(via sshfs) when his connection to the server drops and the website goes down again.
He calls the client again, asking what he's done, this is their conversation:
F(friend): What did you do?
C(client): Nothing, I just left the building.
C: Yes, sure. I turned off the lights and left.
F(suspecting something, knowing that the client is an older person): How did you turn of the lights?
C: Like always, with the breaker by the door.
F: *Facepalm* You can't do that, the servers need electricity to work.
C: Oh.. *Akward silence* *Hangs up*
*5 min later the website's up again and the ticket is closed*6
My coworker doesn't know how to use a terminal. He talked himself into his position and instead of taking the time to learn about the basic commands he keeps asking someone else (including the teammanager, who's actually a software engineer) to do things for him.
For reference; we need the terminal to tail log files, keep track of processes, cron jobs, manipulate file structures, use scp (I use sshfs) to move things between other workstations and servers etc. Being able to use a terminal is one of the basic requirements for our job.
Why do people do this?2
I just set up SSHFS so I can play my media library on my TV without moving all my data!
Basically my setup is something like this:
*Gaming PC (with a total of 10TiB - 6TiB being used for my /home) located in my office
*Home Media PC (with total of 150GB) located in my living room
Everything I have is on my 6TB HDD, and just my Videos folder is larger than the hard drive in the Home Media PC, so I decided to set up SSHFS. After about 15 minutes of reading man pages and trying different configurations, I ended up just needing "sshfs -o nonempty -o allow_other [user]@[location]:/home/$USER/Videos /home/server/Videos/"
This is so great guys; I love Linux so much!3
Update on SSHFS:
I have now moved over to a Samba share that auto-mounts via fstab. It took way too goddamn long....4
Best way to edit files in a text editor on my computer that are on a remote server? I have been looking at products like expandrive and mountain duck but I don't know which one to choose.1
Fuck ssh. It does 4 things at once and i couldn't get it to do one. I have some pi's and want a shared directory on each of them. On a server i created a user for that and mounted its home directory on a pi, it worked. I did some lockdowns (no shell, only sftp allowed, login only via keyfile), but i was still able to mount it on boot.
Now i had to migrate this setup to another server. It took me a while copying all the configuration etc. All i got for that was a error-message. I figured out the users home-directory had to be owned be root, fixed that, got another error message. Somehow scp didn't use sftp but the login shell which is /usr/sbin/nologin. That made scp (and sshfs) fail, even though it perfectly works with the other server.
I gave up and removed all the setup. I'll find another distributed filesystem for that (but not samba or nfs, those are way to complicated). Those are the setbacks that depress me.
SMB/CIFS support on Linux distros is a nightmare! Switching from wired to wireless will cause ALL mounts to freeze, and they all become impossible to dismount normally. You can't even ls the root folder anymore if there are frozen mount folders inside. It's f#&%ing retarded to have to reboot your PC twice a day because you lost WiFi signal for one second, and the underlying processes don't understand SIGTERM. And I could go on about MTP! Standard file transfer protocol for Android but boy it is hellish. Trying to copy a structure with subfolders will take forever because every ls call to the phone is like an API call to some free webhosting company in Australia, takes forever, if it even succeeds. I won't even get started on WebDAV and SSHFS (the latter is even worse than CIFS). Those make me want to do unpleasant things to my computer. So frustrating! I can't be the only one who has experienced this, right?1
VPN -> SSH -> git clone -> git branch -> sshfs pull -> edit-> restart VPN/SSH every hour or so when it goes down -> sshfs push -> git commit -> git push -> fml
How to set up a proper development environment? I was thinking of using virtual box and vagrant on a digital ocean server and using an sshfs tool to map the drive so I can edit locally with vscode. Thoughts?7