Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use sublime text over SSH with multiple computers in same server using rsub?

We are using rsub with multiple computers in the same server. However, every file we open gets directed to the same computer. How can we address this issue?

like image 982
jsmedmar Avatar asked Sep 19 '25 10:09

jsmedmar


1 Answers

LOCAL SETTINGS

In Sublime Text menu, go to Preferences|Browse Packages. Create a file called rsub.sublime-settings in the Packages/User directory:

important: use a different port for each machine that will be connecting to the same server.

--> Packages/User/rsub.sublime-settings

// rsub user settings

{
    /*
        rsub listen port.

        IMPORTANT: Use a different port for each machine.
    */
    "port": 52699,

    /*
        rsub listen host

        WARNING: it's NOT recommended to change this option,
        use SSH tunneling instead.
    */
    "host": "localhost"
}

Change your .ssh/config file:

--> ~/.ssh/config

Host example.com
    RemoteForward 52699 localhost:52699

SERVER SETTINGS

Export the following variables in your profile (bash_profile, zshrc, etc.).

important: Make sure RMATE_PORT is the same that you used in your sublime settings.

export RMATE_HOST=localhost
export RMATE_PORT=52699
like image 126
jsmedmar Avatar answered Sep 21 '25 20:09

jsmedmar