Install rmate
on remote server that stores the files for editing
gem install rmate
(you may need to add sudo)
SSH into the remote server using this syntax
ssh -R 52698:localhost:52698 [email protected]
(change the username@host accordingly)
inside remote server, run rmate