Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsub with sublime and ssh connection refusual

I am trying to use rsub to create tunnel in ssh to sublime text, I run the command rmate .profile but i get the following response. I am using wateroof to open the ports 52968 on 1p4 and ip6, I followed the insturctions here and its just not working

I am running osx on my local machine and ubuntu 12.04 on my remote machine I am ssh into on digitalocean

root@anderskitson:~# rmate .profile /usr/local/bin/rmate: connect: Connection refused /usr/local/bin/rmate: line 186: /dev/tcp/localhost/52698: Connection refused Unable to connect to TextMate on localhost:52698 
like image 308
Cool Guy Yo Avatar asked Sep 22 '13 00:09

Cool Guy Yo


People also ask

Can you ssh with sublime?

Start working with your local Sublime From now on you can simply connect to your servers via SSH and open files by executing the command subl file. txt . After that, your local sublime will open and you will feel at home. Of course, you can also save your files.


2 Answers

I was having the same problem.

Let remoteHost = the IP or hostname of the machine you're attempting to ssh to.

I ran ssh -R 52698:localhost:52698 remoteHost from my local machine, after whice rmate .profile on remoteHost worked.

That led me to determine that ~/.ssh/config on my local machine was incorrect.

I set ~/.ssh/config to look like this:

Host remoteHost   RemoteForward 52698 localhost:52698 

It's been working solidly since I made that change.

like image 72
EricaJoy Avatar answered Sep 21 '22 10:09

EricaJoy


For anyone getting this same error using PuTTy on Windows, this commenter gives great instructions:

  1. In PuTTy's config window, nagivate to the Connection > SSH > Tunnels pane
  2. In the "Source Port" field, type 52698
  3. In the "Destination" field, type 127.0.0.1:52698
  4. Select the "Remote" and "Auto" radio buttons
  5. Click the "Add" button
  6. Go to the Session pane and save if you want to preserve these settings.

Here's an image which does the explaining visually:

rsub configuration windows putty sublime text ssh

like image 30
Alex P. Miller Avatar answered Sep 22 '22 10:09

Alex P. Miller