<p>I have created an ACS Kubernetes cluster following the instructions here: <a href="https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough</a> .</p>

<p>I see that master node has a public IP and I can ssh into the master node using <code>azureuser</code>. But regular nodes has no public IP and I don't see how I can ssh into regular nodes from master node.</p>

<p>How do I SSH into the regular nodes?</p>

<p>You can use one of the k8s masters as a "bastion host" and avoid copying the keys over. Eg:</p>

<pre><code># In ~/.ssh/config

Host agent1_private_ip agent2_private_ip ....
  IdentityFile ~/.ssh/&lt;your_k8s_cluster_key&gt;
  ProxyCommand ssh user@master_public_ip -W %h:%p
</code></pre>

<p>Now just <code>ssh user@agent1_private_ip</code></p>

<p>See more here: <a href="http://blog.scottlowe.org/2015/11/21/using-ssh-bastion-host/" rel="noreferrer">http://blog.scottlowe.org/2015/11/21/using-ssh-bastion-host/</a></p>

<hr>

<p>PS: Here's a quickie to retrieve your agent private ips, in <code>/etc/hosts</code> format:</p>

<pre><code>kubectl get nodes -o json | jq -r '.items[].status.addresses[].address' | paste - -
</code></pre>
