Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Issue with ssh connection between two Azure VMs using Private IP

$
0
0
<style type="text/css">p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; line-height: 15.0px; font: 12.0px Verdana; color: #000000; -webkit-text-stroke: #000000} p.p2 {margin: 0.0px 0.0px 12.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #000000; -webkit-text-stroke: #000000} span.s1 {font-kerning: none} span.s2 {font: 12.0px Verdana; font-kerning: none} </style>

Hi,

I am new to Azure. I tried creating two VMs on Azure and was able to do ssh using public key from my Mac to these two systems. For communicating between these two VMs I had created a user ansiadmin with same username and password on both the VMs. And then logged in to this new user ansiadmin on VM1. 

From VM1 ansiadmin I executed ssh-keygen and got the id_rsa.pub key in ~/.ssh folder.

Then I did, $ ssh-copy-id <private IP of VM2> 

Getting "ssh: connect to host 10.0.1.5 port 22: Connection timed out" error.

With the Support documents I understood that my Private IP was dynamic. So corrected from Dynamic to Static and changed to a new IP which was present within subnet range. Even after correcting this and restarting the system its the same issue. 

I tried copying the ~ansiadmin/.ssh/id_rsa.pub key from VM1 to ~ansiadmin/.ssh/authorized_keys on VM2 manually and tried doing "ssh <private ip of VM2>" from VM1. But still same error.

What else is missing ? Please provide pointers since I am unable to proceed further.

Thanks in advance.



Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>