Rancher CLI and SSH?

When I attempt to use the rancher CLI to ssh into a node, ssh fails to connect because its using the AWS private ip instead of the public one. The node template has “privateAddressOnly”: false which seems appropriate. Is there a way to force the connection to the public ip?

Wish this worked as I find downloading the keys to each node to be cumbersome, especially since I am iterating and node are coming and going frequently.

1 Like

There was an additional flag on template: useInternalIpAddress but setting that to false, did not work. Ended up forking the cli repo and adding an option to use the external ip. https://github.com/jeremyweber-np/cli/tree/jweber-allow-ssh-external-ip

Hi Jeremy,

It’s an old issue, but one I’ve been running into as well. I’ve tried your changes, and they work well for me. Have you considered making this a Pull Request to Rancher? (I would support that)

That was done, and it was merged in, in some form or another.