SSH connection without password between two Azure VMs
I have two RHEL7 VMs running in the same resource group with the same subscription ID. I have assigned DNS names to them; master.eastus.cloudapp.azure.com and node.eastus.cloudapp.azure.com
The ips are dynamically assigned by Azure
These VMs are setup for a manual installation of OpenShift which requires two VMs and will need to communicate with ssh, no password
Both VMs are on the same subnet: subnet Virtual network/subnet: openshift-vm-vnet/default
I have set up two Network Interface Inbound rules for each vm-vnet/default
Master :: internal ip 10.0.0.3 name port protocol Source Destination Action default -allow-ssh 22 TCP <Corp ip> Any Allow node_vm 22 TCP 10.0.0.0/29 Any Allow Node :: internal ip 10.0.0.4 name port protocol Source Destination Action default -allow-ssh 22 TCP <Corp ip> Any Allow master_vm 22 TCP 10.0.0.0/29 Any Allow
I am able to connect to both of the the VMs using the domains with windows 10 v 1 power shell.
ssh -v email@example.com
When connected to the VM in powershell, I am unable to connect to the other VM with the domain. trying to connect to a domain from a windows 10 power shell connected to a VM instance times out
[rhel7@master ~]$ ssh -v firstname.lastname@example.org OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: Connecting to node.eastus.cloudapp.azure.com [public ip] port 22. debug1: connect to address [public ip] port 22: Connection timed out ssh: connect to host node.eastus.cloudapp.azure.com port 22: Connection timed out
I am able to connect using the internal ip. 10.0.0.x
ssh-keygen has been run on both VMinstances:
ssh-keygen -t rsa -b 2048
(No password entered)
with keys created in
~/.ssh/id_rsa.pub on each VM.
When trying to copy the key from the master to the node
ssh-copy-id -i ~/.ssh/id_rsa.pub email@example.com
The connection times out.
using the internal ip address is successful.
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.0.0.3 successfully transferred the id_rsa.pub key value to the server.
Logging in to the server >ssh 10.0.0.3 still requires a password
How do I configure two azure vms for ssh passwordless connections so they will be able to communicate as a part of the Openshift installation process?