Open dsmiley opened 8 years ago
Seems like you can use kontena node ssh --internal-ip nodename
:
Usage:
kontena node ssh [OPTIONS] NODE_ID
Options:
....
--internal-ip Connect to node's internal IP address (requires VPN connection)
It would be nice if kontena node ssh
was smart enough to chose the right address automagically. This would also apply to using the --private-ip
for local Vagrant nodes, as their public IP is in the magical VirtualBox 10.0.2.0/24
that the host machine does not have connectivity for.
Thanks for the tip @SpComb . Maybe it'd be helpful if kontena node ssh could be instructed to default to internal ip.
I guess the biggest trick is to figure out if the VPN to Kontena grid is open or not. :) Could be possible to check if the system where CLI is running has IP address/route to the grid overlay network. (it's nowadays customizable so can't hard code for 10.81.0.X addresses)
kontena node ssh
generally doesn't work for me because it uses an IP behind NAT -- it's how my network is set up in my OpenStack based cloud provider. Only one of my nodes in fact have a public IP. When I am VPN'ed into the grid, I wishkontena node ssh
chose the weave IP of the form 10.81.0.x. Then it would work.This is a different and complementary approach to #1297