XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Login detail fro Debian 10 cloud-init

    Scheduled Pinned Locked Moved Compute
    16 Posts 3 Posters 4.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fred974
      last edited by

      Hi,

      I just deployed a new VM using XOA hub template and I cannot login to the VM as I have no idea what the password is. I am guessing that the user is call 'debian'.

      Could anyone please assist?

      Thank you

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi!

        There's no password. You must add an SSH key.

        F 1 Reply Last reply Reply Quote 0
        • F Offline
          fred974 @olivierlambert
          last edited by

          @olivierlambert said in Login detail fro Debian 10 cloud-init:

          There's no password. You must add an SSH key.

          Haa..
          So if I didn't do I simply delete the VM create a new one ?

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Correct 🙂

            F 1 Reply Last reply Reply Quote 0
            • F Offline
              fred974 @olivierlambert
              last edited by

              @olivierlambert thank you

              F 1 Reply Last reply Reply Quote 0
              • F Offline
                fred974 @fred974
                last edited by

                @fred974 I just deleted the VM and deployed a new one making sure to select the ssh key.
                When the VM start, it as me for the Debian password and not the ssh key password.

                I am not sure where I went wrong. My ssh key is ssh-ed25519, does it have to be rsa?

                When I deploy a VM manually I always do full disk encryption. I that something I can also do using cloud-init?

                Thank you

                1 Reply Last reply Reply Quote 0
                • olivierlambertO Offline
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by

                  Just SSH on it, do not access it via the console. If you absolutely create a password, you can (connect in SSH first, then create the pwd).

                  F 1 Reply Last reply Reply Quote 0
                  • F Offline
                    fred974 @olivierlambert
                    last edited by fred974

                    @olivierlambert said in Login detail fro Debian 10 cloud-init:

                    Just SSH on it, do not access it via the console.

                    I did do that but got prompt for normal password.

                    fred@debian10:~$ ssh -i ~/.ssh/ed25519_2021 debian@172.16.50.245
                    debian@172.16.50.245's password:
                    Permission denied, please try again.
                    debian@172.16.50.245's password:
                    

                    First, I tried to use my ssh key password but no luck. Does cloud-init assign my ssh key to user Debian?

                    I copied my puclic ssh key when I created the VM. Is that correct?

                    1 Reply Last reply Reply Quote 0
                    • olivierlambertO Offline
                      olivierlambert Vates 🪐 Co-Founder CEO
                      last edited by olivierlambert

                      You should be able to log with debian user and your SSH key. Are you sure you put the SSH key correctly? 🤔

                      F 1 Reply Last reply Reply Quote 0
                      • F Offline
                        fred974 @olivierlambert
                        last edited by

                        @olivierlambert
                        When creating the VM, I typed the ssh public key where the red arrow is
                        2b6a4ce7-a7f0-4fa8-bc57-b52ffc766012-image.png
                        Then the key moved to the right.

                        That's all I did

                        1 Reply Last reply Reply Quote 0
                        • olivierlambertO Offline
                          olivierlambert Vates 🪐 Co-Founder CEO
                          last edited by

                          That sounds right 🤔

                          I cannot reproduce it, can you show us your SSH public key in XO? It should be visible in your user space (the "user" icon below "Sign Out" in the left menu).

                          jedimarcusJ F 2 Replies Last reply Reply Quote 0
                          • jedimarcusJ Offline
                            jedimarcus @olivierlambert
                            last edited by

                            I can confirm.

                            • Template from Hub
                            • New SSH key selection in User/Profile screen of XOA
                            • Create new VM with SSH key selected
                            • Login over ssh with
                            ssh debian@<ip>
                            
                            • Success
                            1 Reply Last reply Reply Quote 0
                            • F Offline
                              fred974 @olivierlambert
                              last edited by

                              @olivierlambert
                              Sure, here it is
                              7d69e604-6e8d-4cf6-9953-49b9001403f0-image.png

                              1 Reply Last reply Reply Quote 0
                              • olivierlambertO Offline
                                olivierlambert Vates 🪐 Co-Founder CEO
                                last edited by

                                Try to remove and recreate it, without the hostname in the end (IDK if you can have a space in there)

                                F 1 Reply Last reply Reply Quote 0
                                • F Offline
                                  fred974 @olivierlambert
                                  last edited by

                                  @olivierlambert said in Login detail fro Debian 10 cloud-init:

                                  Try to remove and recreate it,

                                  That worked 🙂 I didn't removed the the hostname in the end.
                                  I can now ssh to the Newly created VM.

                                  1 Reply Last reply Reply Quote 1
                                  • olivierlambertO Offline
                                    olivierlambert Vates 🪐 Co-Founder CEO
                                    last edited by

                                    Okay so maybe a typo in the key the first time you entered it 🙂

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post