Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH to Private IP #169

Closed
tlongren opened this issue Jun 20, 2015 · 10 comments
Closed

SSH to Private IP #169

tlongren opened this issue Jun 20, 2015 · 10 comments
Labels

Comments

@tlongren
Copy link

Hi!

I just installed Xubuntu 15.04 on my laptop, a new version of tugboat than is on my main workstation.

When I do

tugboat ssh dropletname

It attempts to connect to the private (internal) IP address. I have done little research into it, but wanted to make a note here quick. It perhaps isn't related to tugboat and something with the droplets.

Not using tugboat, I can SSH to the external IP just fine.

Thoughts?

Thanks for tugboat, btw, it's an awesome tool.

@vmatekole
Copy link

Hi, I can also confirm I have same issue, with tugboat 1.0

@tlongren
Copy link
Author

Definitely a somewhat recent issue. I have tugboat 0.2.8 installed on my main workstation and it connects to the external IP address of the specified droplet, as expected.

@PhilETaylor
Copy link
Contributor

ah so this is what my problem is - it just hangs on connecting when I do a tugboat ssh ... so its trying to connect to the wrong IP ?

@petems petems added the bug label Jul 14, 2015
@petems
Copy link
Owner

petems commented Jul 14, 2015

@tlongren So we allowed people to set if they wanted to connect to the private or public IP in 7b307b1, looks like that might've gone wrong.

Can you try adding the following into your ~/.tugboat file:

use_public_ip: 'true'

And see if that fixes it?

@petems
Copy link
Owner

petems commented Jul 14, 2015

Can you also show the contents of your ~/.tugboat file (with the API keys redacted)

@PhilETaylor
Copy link
Contributor

I'm using Tugboat 1.0.0 installed with gem

my .tugboat file content:

---
authentication:
  client_key: redacted
  api_key: redacted
ssh:
  ssh_user: root
  ssh_key_path: "~/.ssh/id_rsa"
  ssh_port: '5819'
defaults:
  region: '1'
  image: '350076'
  size: '66'
  ssh_key: id_rsa
  private_networking: 'false'
  backups_enabled: '1'
  use_public_ip: 'true'

When running command tugboat ssh 100 I get:

Phils-iMac:~ phil$ tugboat ssh 100
Droplet fuzzy name provided. Finding droplet ID...done, 2266854 (lon100.myjoomla.com)
Executing SSH (lon100.myjoomla.com)...
ssh: connect to host 10.131.248.10 port 5819: Operation timed out

Note that 10.131.248.10 is the private IP address of the droplet with 178.62.62.30 as a public IP address.

@PhilETaylor
Copy link
Contributor

Note that a command with option -e works and allows ssh to public IP address

This command works for me.
tugboat ssh 100 -e

@tlongren
Copy link
Author

@petems, same deal here as @PhilETaylor.

tugboat ssh droplet -e

works like @PhilETaylor suggested.

@petems
Copy link
Owner

petems commented Jul 18, 2015

Weird, that should be the default. I'll see if I can fix up the logic.

@petems
Copy link
Owner

petems commented Jul 18, 2015

Fixed and released in 1.1.0

I didn't catch it because in my acceptance tests, because I don't have any servers with private IPs. Will update.

@petems petems reopened this Jul 18, 2015
@petems petems closed this as completed Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants