# Rancher CLI and SSH?

**URL:** <https://forums.suse.com/t/rancher-cli-and-ssh/11107>\
**Category:** SUSE Rancher Prime\
**Created:** [July 12, 2018, 9:07pm UTC](https://forums.suse.com/t/rancher-cli-and-ssh/11107 "2018-07-12T21:07:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [July 12, 2018, 9:07pm UTC](https://forums.suse.com/t/rancher-cli-and-ssh/11107/1 "2018-07-12T21:07:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [July 18, 2018, 1:07pm UTC](https://forums.suse.com/t/rancher-cli-and-ssh/11107/2 "2018-07-18T13:07:10Z")

</div>

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](https://github.com/jeremyweber-np/cli/tree/jweber-allow-ssh-external-ip)

---

<div class="post-metadata">

**Author:** ![thatcher](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/thatcher/32/4690_2.png) [@thatcher](https://forums.suse.com/u/thatcher)\
**Post date:** [July 14, 2019, 8:33am UTC](https://forums.suse.com/t/rancher-cli-and-ssh/11107/3 "2019-07-14T08:33:16Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [September 19, 2019, 9:27pm UTC](https://forums.suse.com/t/rancher-cli-and-ssh/11107/4 "2019-09-19T21:27:18Z")

</div>

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