Doug Fir
Doug Fir

Reputation: 21282

rsub connect_to localhost: unknown host (nodename nor servname provided, or not known)

(Tag recommendations for adding or removing are welcome)

I've installed Sublime 3 and followed the instructions to set up rsub to work with files on a remote host. Specifically I have:

  1. Installed rsub with Sublime 3 using package manager
  2. On my remote server:

    wget -O /usr/local/bin/rsub \https://raw.github.com/aurora/rmate/master/rmate chmod a+x /usr/local/bin/rsub

  3. Restarted my remote server sudo shutdown -r now

  4. In my ~/.ssh/config I set what I have below this list

  5. Then I ssh in: ssh -R 52698:localhost:52698 aws

  6. Then I tried to open a file: rsub path/to/myfile.py Resulted in:

connect_to localhost: unknown host (nodename nor servname provided, or not known)

My ssh config:

Host aws
Hostname ec2-12-345-6-789.us-east-2.compute.amazonaws.com
User ubuntu
ForwardAgent yes
TCPKeepAlive yes
IdentityFile ~/.ssh/my_key.pem
RemoteForward 52698 127.0.0.1:52698

I also tried ssh ing with just:

ssh aws

This time I get this error message:

connect_to 127.0.0.1 port 52698: failed.

How can I use rsub to work on remote scripts with Sublime? Why am I hitting these error messages and how can I resolve them?

Upvotes: 1

Views: 1041

Answers (1)

user10622040
user10622040

Reputation: 11

I was experiencing the same error message as well. I found that I simply had to have the sublime text application open before executing the rsub command on the command-line.

Upvotes: 1

Related Questions