Alternative to SSH command line from Ubuntu

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.


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.


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 sftp://example.com/ and press Enter. This will open an SSH (actually SFTP) connection to example.com 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.

Tags:

Linux

Ssh