0

OS: Ubuntu 12.04

I was wondering if there are programs which let you edit a file on a remote server through ssh. Basically what I'm looking for is the following:

There is a remote AIX server that contains a certain file (a perl script i.e.) and I want to edit it from my native machine (my Ubuntu). Is there a program which lets me edit the file (by first giving the IP and password of the remote server) and save the file on the server?

Ofcourse I could just edit the file on the remote server, but I was wondering if there exists something like the NppFTP plugin for Notepad++ on Windows. It doesn't matter if it is terminal (nano i.e.) or gui.


Solution 1:

ssh -X user@server gedit file.txt

This doesn't work because gedit is not installed on the remote server

Noosrep
  • 2,154

2 Answers2

1

You can try

vim scp://remoteuser@server.tld//path/to/document

More info and examples

tuxar
  • 144
  • 5
  • This opens a file called /tmp/vxTuIQp/0.pl and not my specified file? – Noosrep Jul 24 '14 at 10:49
  • When you save your work that local copy is sending to remote server and you will see something like

    :!scp -q '/tmp/vxTuIQp/0.pl' 'remoteuser@server.tld//path/to/document'

    – tuxar Jul 24 '14 at 11:18
1

You can also install sshfs

Running the following commands:

sudo apt-get install sshfs
sudo modprobe fuse
sudo addgroup yourlocalusername fuse
mkdir servermountfolder
sshfs yourusername@server:/path/to/file/  servermountfolder

Will mount the remote server into the servermountfolder on your desktop pc. Where you can easily edit the file directly with any editor of your liking.

tomodachi
  • 14,832