I am connecting to remote server using "mRemoteNG" and want to open remote server files in my local sublime text editor. During my research, I found this relevant blog https://wrgms.com/editing-files-remotely-via-ssh-on-sublimetext-3/ and followed the instructions but it is not working for me. Does, anybody know how can I open remote files in my Sublime?
This question is related to
ssh
sublimetext3
remote-server
On macOS, one option is to install FUSE for macOS and use sshfs
to mount a remote directory:
mkdir local_dir
sshfs remote_user@remote_host:remote_dir/ local_dir
Some caveats apply with mounting network volumes, so YMMV.
Base on this.
Step by step:
On your remote server:
sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
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:
echo "export PATH=\"$PATH:/usr/local/bin\"" >> $HOME/.bashrc
Now just log off, log back in, and you'll be all set.
Source: Stackoverflow.com