0

I have set up three virtual machines, two on one virtual network and one on another virtual network via this tutorial, which was recommended on this forum for a similar issue. As such, the virtual networks were set up on two different Azure servers: Australia East and Australia South East. I then created two gateways each with different ip ranges e.g. 192.168.0.0/16 and 10.0.0.0/16 and then connected them together using the Azure interface.

Now, what I want to do is have the main client, copy files to the other two servers updating the configurations, or ssh into the other server via the client server to update or add users. However when I try to ssh username@ip_address even though I have given Azure the PSK for the network, it gives me a permission denied. So I open the ports using just in time access and the same thing, permission denied.

Yesterday, I tried having all the servers on the same network and then I added the host name systemctl and setup access for ssh via /etc/environment I was able to use ssh-copy-id and get into the slave server, yet eventually when I ran the main program I want to install and have working between the three servers, again permission denied. Am I wasting my time with Azure, is this at all even remotely possible on the service?

02-07-19 edit:

Set internal and external network via bind9. Change sshd_config to; PermitRootLogin prohibit-password, as WAV and LAN are both private_ip addresses. Could list what I did in the bind9 DNS files if needed, take from [this website] and altered for internal ip_addresses 3 and output of hadoop binary files as done here:

$ start-dfs.sh
Starting namenodes on [hadoop.dns.nameUsed]
hadoop.twor.universe: ssh: Could not resolve hostname hadoop.dns.nameUsed: Name or service not known
Starting datanodes
10.1.0.4: hadoop@10.1.0.4: Permission denied (publickey).
10.1.0.5: hadoop@10.1.0.5: Permission denied (publickey).
Starting secondary namenodes [NameOf-Client-Node]
NameOf-Client-Node: hadoop@NameOf-client-node: Permission denied (publickey).

I am wondering if it is because, a) I don't have a clue or b) I have the dns service on the client server. Anyway, nothing hurt by trying.

Haven't fully looked at the ports and may be the reason for permissioned denied, Apache Hadoop Ports

tcratius
  • 101
  • 4
  • What exactly is the end goal you are looking to achieve? If you want VMs in diffefent networks to communicate you can simply peer the networks: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview – micahmckittrick Jul 01 '19 at 16:57
  • Sigh, I was too embarrassed to say, I wanted to take a cloned version of Hadoop, each server has Hadoop and java on it. The main server adds files via SCP using user@IPAaddress and then run it. The concept of DNS is not my specialty, so I struggled to understand which, naming conventions and IPAddresses to use to invoke the nodes. To be honest, I find it confusing that some of the tasks are completed on Azure and others are possibly within Ubuntu and lastly, I think it is not within my skills level. However, I have pretty much what your link provides, I'd say the rest lays with configurin nix? – tcratius Jul 02 '19 at 00:46
  • I'll try installing bind and configuring it to the local network gateway and if that fails, I'll got to plan B. – tcratius Jul 02 '19 at 00:49
  • 1
    Had another look at the peering and, looks like a better option, less complicated and probably can get away with only creating an additional client server. – tcratius Jul 02 '19 at 07:49

1 Answers1

0

Total rookie error, steps to fix:

  1. Reset Password via Azure Portal for the slave not to ssh into Reset_Password.

  2. Added userName and Password and Save.

  3. Goto to the terminal of the master node.

    $ ssh-keygen -t rsa
    $ scp .ssh/id_rsa.pub userName@IPAddress
    $ ssh userName@IPAddress
    $ nano /etc/ssh/sshd_config

Change the following values:

  • ChallengeResponseAuthentication no
  • PasswordAuthentication no
  • UsePAM no

Save and exit

$ logout  
$ cat .ssh/id_rsa.pub  

4. Manually copy the RSA key output from terminal.
5. Goto to Azure Portal (all slave nodes) and reset ssh via: Reset_Password
6. Add the userName and RSA key copied from above and Save.
7. Enter the command line interface of the master node.
8. ssh userName@IPAddress

And then you should be in, otherwise, add port 22 to slave node destination private IPAddress. Had already add prior to the above steps.

tcratius
  • 101
  • 4