I've recently fallen in love with github's Atom text editor, and I enjoy using it for all my local coding and configuration.
I started to maintain a Nagios installation for several dozen servers and I'm realizing that I'm growing tired of using ssh and remote vim to perform my editing. I'd like to use Atom to do this instead.
I've looked into ways of doing this. One of my biggest problems is that Nagios and NRPE configuration files require su permissions to overwrite. I'm editing files in /etc/ and /usr/. I can open the file in Atom locally in many ways, but I can never save it.
Here's a few ways I can think of to deal with this (tell me which you think is the best way or if you've got another idea, I'd love to hear it!).
- I could use sftp and try to edit the files here (but I imagine I'd run into root permissions issues when I try to save?)
- I could use sshfs to mount the server on my local machine and edit that way (still not sure about permissions issues?)
- I could add the user on the remote machine to the sudoers file for full permission without password prompting (but I don't think this is a safe idea, and again, I imagine I'd still need some form of sudo to actually save?)
- Just copy the file over and manually use an rsync command to sync the file back over when I'm done editing (which would be rather tedious but is looking to be the most promising).
Is there maybe an Atom plugin you're aware about that might help me?
I know I can't be the first person to want to do this. I did some searching and found some people suggest SSHFS, but I'd like to know what the current thinking is.