Code Monkey home page Code Monkey logo

Comments (5)

davidcawork avatar davidcawork commented on May 26, 2024

Hi Jack 😄 ,

Can you please provide more info about your scenario? And more important, What method have you followed to install our project?

Best,

from project.

jackinhub avatar jackinhub commented on May 26, 2024

Hi David,

Thank you for the quick prompt. Sure. I installed a virtualbox Ubuntu 16.04 VM and get the test and controller VMs nested. I find the username and password, but still failed to SSH. Probably because the private_key file is not in the folder. I have not tried to set up the SSH to bypass the problem yet. Just wondering why the private_key is not generated with your code.

Cheers,

from project.

davidcawork avatar davidcawork commented on May 26, 2024

Hi Jack 😄 ,

As far as I understand (correct me if I'm wrong), your scenario is a virtual machine, and inside it, you have manually created two virtual machines (test, controller) with Virtualbox.

I understand that you have followed the native installation steps, and you have run the shellscripts on each machine. In this installation method, unlike the vagrant installation method, SSH key management is not configured as Vagrant does for us. One of the strengths of Vagrant is that it takes care of the generation of a key pair for us, puts the public one on the machine it is deploying, and sets the path of the private one (.vagrant/machines/{vm_name}/virtualbox/private_key), so we can connect to that machine doing a vagrant ssh {vm_name} or ssh -i .vagrant/machines/{vm_name}/virtualbox/private_key vagrant@{vm_IP}. Therefore, since you have followed another installation method, you do not have the key pairs to connect to them via SSH.

How could you do the key configuration yourself ? I would do it in the following way 😺 :

# Generate a pair of keys
ssh-keygen

# At this point you can set a name for your key pair, depending on the name you enter, 
# two files will be generated: name_entered (private one) and name_entered.pub (public one).

# You have to change the permissions of the keys, so that ssh does not consider them insecure.
chmod 600 name_entered.pub name_entered 

# Now that you have the generated keys, you will need to log into each VM, and deposit the generated public key. 
# Ideally, you should generate a pair of keys for each VM. Whatever you prefer. In case you do not have installed a ssh server 
# in each VM, you have to install it: sudo apt install -y openssh-server 

# Open this file, or create it. And paste the the PUBLIC one inside 
sudo vim /home/{user}/.ssh/authorized_keys

# At this point you could connect via ssh to the VM by doing so:
ssh -i name_entered {user}@{vm_IP}

I hope I have clarified your doubts, 😼

from project.

jackinhub avatar jackinhub commented on May 26, 2024

Thanks David. I followed the vagrant method. The problem could be the speed of the deployment of the two nested VMs (about 20 minutes to boot up). It was timed out for a couple of times. And the key was not generated automatically. I will try it again, and get back to you.

from project.

davidcawork avatar davidcawork commented on May 26, 2024

Hi @jackinhub,

I understand that the issue would be resolved. If you continue to have problems I encourage you to re-open it, or open a new one if a different issue persists. 😄

from project.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.