I felt the importance of directly editing a file from a DigitalOcean droplet on my Ubuntu Server. I research on the internet and made a way to do it.
-
Install "rsub" in your Sublime Text.
- Hit Ctrl+Shift+P, start typing “install” and select “Install Package”
- Start typing “rsub” and select it.
-
nano ~/.ssh/config and paste the following lines:
Host remoteHost RemoteForward 52698 localhost:52698
In my case my host is: [email protected]
So, I have put the following in my ~/.ssh/config file
Host [email protected] RemoteForward 52698 localhost:52698
-
Install the rsub script:
sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
-
Make it executable:
sudo chmod +x /usr/local/bin/rsub
-
Now, you are ready to open any file by typing "rsub" before it. Example:
sudo rsub info.php
Directly ssh into remote server with rsub enabled: ssh -R 52698:localhost:52698 [email protected]
http://stackoverflow.com/questions/18938950/rsub-with-sublime-and-ssh-connection-refusual
To make life easier for me to copy/paste this when I need it:
sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate; sudo chmod +x /usr/local/bin/rsub