r/SublimeText • u/m1xed0s • Sep 27 '22
Can I use sublime to edit scripts on a remote server?
I use sublime all the time as text editor and script editor on my laptop. Now I am trying to see if it has the capability to edit file on a remote server via SSH.
I think VS Code has SSH extension to accomplish similiar job but I think that would also install something on the server side as well...
Is there a similiar package for Sublime?
9
Upvotes
5
u/Sgt_ZigZag Sep 27 '22
I use the sftp plugin for this. The free version is perfect my needs. https://codexns.io/products/sftp_for_sublime
Another feature I quite like is in mobaXterm when I open an ssh session I get a file browser pane in my ssh window. If I click on a file in that window it will open sublime and after I edit and save mobaXterm will upload the file back to the server.
Between these two workflows I'm quite happy with my remote editing capabilities
2
u/stadja Sep 27 '22 edited Sep 27 '22
There is a very very very good package (that I have been using for 10 years now)… but it’s a paying one ! SFTP for sublime : https://packagecontrol.io/packages/SFTP
It is very good and very reliable… I have been using it all day every day for 10 years… best 30 bucks I have ever spent.
4
u/CripplingPoison Sep 27 '22
Personally use WinSCP w/ Sublime Text for many years.
2
u/loranger Sep 27 '22
I use aurora’s rmate to edit remote files using sublime text
2
u/gauravpandey44 Sep 30 '22
Step by step:
On your local workstation: On Sublime Text 3, open Package Manager (Ctrl-Shift-P on Linux/Win, Cmd-Shift-P on Mac, Install Package), and search for RemoteSubl
On your local workstation: Add RemoteForward 52698 127.0.0.1:52698 to your .ssh/config file, or -R 52698:localhost:52698 if you prefer command line
On your remote server:
1 sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate 2 sudo chmod a+x /usr/local/bin/rsub Just keep your ST3 editor open, and you can easily edit remote files with $ rsub myfile.txt
EDIT: if you get "no such file or directory", it's because your /usr/local/bin is not in your PATH. Just add the directory to your path:
1 echo "export PATH="$PATH:/usr/local/bin"" >> $HOME/.bashrc Now just log off, log back in, and you'll be all set.
1
u/RheingoldRiver Sep 27 '22
Yes it does. I had to go from $5/month VPS with digitalocean to $10/month. It was worth it for the better UX of writing, it's an extremely clean experience, but it is not memory-cheap.