I'm trying to edit files on a remote Amazon EC2 Linux instance. I'm currently just sshing in and using nano, but would really like a graphical text editor. I have two problems:
Please help! I'm not picky, just any graphical text editor since using nano is a huge pain.
To help anyone that just need a quick command line text editor:
you can use vi:
vi file-name.txt
or nano:
nano file-name.txt
optionally use sudo if editing the file, eg:
sudo nano file-name.txt
For remote editing, there are lots of options here: This answer, like any other, is sure to become outdated as more options enter the field.
vim
, the netrw
module meets this need, and is shipped with the editor by default.emacs
, this is available with TRAMP.I'd suggest starting with the editor you prefer and evaluating options from there. If you set up your SSH session to be able to authenticate directly to root (password auth is best disabled for root, but if you have sudo you can install RSA keys), then you'll be able to specify root as a target user for any of the above.
By contrast, if you really do need sudo
, you still have options:
tramp
to open files sudoed to root on the Emacs wiki. New versions also support a ssh+sudo
transport, meaning this wiki entry may already be out-of-date.amazon now acquire Cloud9, which is a browser-based IDE that can edit your EC2.
https://aws.amazon.com/cloud9/
Just modify the appropriate files on your local machine and scp the file into the remote machine.
scp <local_machine_path_to_file> remoteUser@remoteHostName:<filePath>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With