Remote Editing on AWS EC2 from a Mac

This note captures the steps to setup and configure Sublime Text editor to remotely editing text file on AWS EC2 instance from a proper computer (aka a Mac).

1. Install Sublime with rsub locally
  1. The Sublime Test version 3 is available for download here: https://www.sublimetext.com/3
  2. Open Sublime Text 3 and press COMMAND+SHIFT+P to bring up the command bar and type Install and click Package Control: Install Package and click it. Wait a moment for the installation to complete and type rsub and click it.
  3. Now you have done the installation for rsub.

2. Install rmate remotely

    Log into the AWS EC2 instance and install rmate:
         pip3 install rmate
3. Launch remote text file

    Log into the AWS EC2 instance with remote tunneling: 

ssh -i "ec2-user.pem" ec2-user@ec2-3-1-xxx-141.ap-southeast-1.compute.amazonaws.com -R 52698:localhost:52698
rmate your_file.txt

Now your text file will be launched in your Sublime Text 3 locally. You may edit and save using Command+s.

Comments