Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a machine at work that's running CentOS. In order to get into it, I use ssh.

We're not allowed to install any window-management systems on it. Sometimes, I need to do a lot of work on it, such as editing configs, checking multiple logs, etc. All this becomes a bit tedious working on the command line (forgive me I'm not a command line ninja).

I've just been having multiple sessions going in order to have all the logs and files I need up but is there someway I could "see" the remote machine's file system on my local machine, so that I could open and edit the remote machines files on my local machine that has all my nice windows and text editors available on it?

share|improve this question
Hi there, sorry I misinterpreted your question. Thank you for clarifying the title for us. – Canadian Luke Aug 8 '14 at 20:09
No problem. Should have added that in first place. – ThrowsException Aug 8 '14 at 20:15
Have you looked into terminal multiplexing software? Screen and tmux allow you to have multiple sessions open simultaneously, and provide a pseudo-windowed interface over a pure ssh session. Plus, it's almost guaranteed that your CentOS box even already has at least screen on it. – Fake Name Aug 9 '14 at 11:31
Does X-forwarding count as a window management system? – user20574 Aug 9 '14 at 23:16
up vote 26 down vote accepted

Look into installing sshfs if you're on Linux. You can remotely connect to a machine over ssh, but it will show it as part of the file system on your local machine, so you can edit files in your local editor, and treat it as if it were a local file. You don't even have to install anything on the server side, it all just works off of ssh.

Similarly, there is win-sshfs for windows, which takes a similar approach to sshfs, but instead mounts the file system as a Windows network drive. Thanks for the recommendation Lexi R!

Another alternative would be using FTP to grab the files and put them onto your local machine, view and edit them as you'd like, then use FTP to put them back in place. You'd need a FTP server on the CentOS box, and you can use something like Filezilla to connect.

share|improve this answer
sshfs is not an alternative if he's using Windows. In that case WinSCP would be a better fit. – Marcelo Aug 8 '14 at 20:08
sshfs was exactly what I was looking for. That is boss. – ThrowsException Aug 8 '14 at 20:15
FileZilla has built-in support for SFTP, which (confusingly) has nothing to do with FTP but everything to do with SSH. On a normal server, if you can SSH to it, you can probably SFTP with the same credentials, and no FTP server needs to be installed. (WinSCP uses the same protocol, so either both will work or neither.) – IMSoP Aug 9 '14 at 22:23
@Marcelo win-sshfs is available, my roommate swears by(and at) it. – Lex R Aug 20 '14 at 20:06

If you are running the connection from Windows, you can check out WinSCP. It is free, and gives you a tree-view (Explorer-like) of the file system that you have access to.

If you are running from a *nix environment, you'll need to enable some sort of file access to it, such as FTP (insecure), SFTP (secure), or you can mount the remote filesystem as a CIFS, NFS or sshfs file system. All these options are free, and should be built in to your OS.

share|improve this answer

Current Linux desktops often have some kind of sshfs built-in. Eg. in Gnome, open the file manager (Nautilus), press Ctrl+L to get an editable location bar, and enter an URL like s and press Enter. This will open an SSH (actually SFTP) connection to and present its contents in the file manager, and you can browse it like any local directory.

Once you have established the connection, you can also access the remote directory from non-Gnome applications (eg. KDE apps, or even from command line). Easiest way is probably to drag the directories from file manager into the target application or into the shell. With some experience you can also navigate to the remote directory manually: they are usually mounted under ~/.gvfs/ or under /run/user/<userid>/gvfs/.

KDE appears to have a similar mechanism as well.

I have no experience with sshfs, but I guess sshfs and the Gnome-builtin SFTP access (GVFS) offer similar features. Personally I like GVFS for it's ease of use, and also appreciate that it's quite universally available nowadays without installing additional software or setting anything up.

share|improve this answer
That's what I do under similar circumstances. To make a permanent connection (in Gnome), go to "Places" and choose "Connect to Server". – jaia Aug 9 '14 at 20:28

In Notepad++, the NppFTP Plugin supports SCP. I use it all the time to edit files remotely. Navigate in the NppFTP tab, double click a file to download it to a temp directory, and it's uploaded when you save the file.

share|improve this answer

Use a configuration management tool (like puppet or ansible). In this way you can keep your configuration files locally and can use your local tooling. As a nice "side" effect (which is probably even more important) you can get the configuration version controlled, automatically deployed and easily reproduced (also for additional servers).

share|improve this answer

I think NFS may be better solution if the client machine (From where you are editing the files). Share the files via NFS and mount them in client machine. It will appear as a local drive. You can use any of your favorite GUI editors to edit the files.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .