Error: [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

670 views Asked by At

windows 11 Vagrant 2.4.0 I was using multiple vagrants using single file This is the code of my vagrant file


Vagrant.configure("2") do |config|
  config.hostmanager.enabled = true 
  config.hostmanager.manage_host = true
  
### DB vm  ####
  config.vm.define "db01" do |db01|
    db01.vm.box = "eurolinux-vagrant/centos-stream-9"
    db01.vm.hostname = "db01"
    db01.vm.network "private_network", ip: "192.168.56.15"
    db01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
   end

  end
  
### Memcache vm  #### 
  config.vm.define "mc01" do |mc01|
    mc01.vm.box = "eurolinux-vagrant/centos-stream-9"
    mc01.vm.hostname = "mc01"
    mc01.vm.network "private_network", ip: "192.168.56.14"
    mc01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
   end
  end
  
### RabbitMQ vm  ####
  config.vm.define "rmq01" do |rmq01|
    rmq01.vm.box = "eurolinux-vagrant/centos-stream-9"
  rmq01.vm.hostname = "rmq01"
    rmq01.vm.network "private_network", ip: "192.168.56.13"
    rmq01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
   end`your text`
  end
  
### tomcat vm ###
   config.vm.define "app01" do |app01|
    app01.vm.box = "eurolinux-vagrant/centos-stream-9"
    app01.vm.hostname = "app01"
    app01.vm.network "private_network", ip: "192.168.56.12"
    app01.vm.provider "virtualbox" do |vb|
     vb.memory = "800"
   end
   end
   
  
### Nginx VM ###
  config.vm.define "web01" do |web01|
    web01.vm.box = "ubuntu/jammy64"
    web01.vm.hostname = "web01"
  web01.vm.network "private_network", ip: "192.168.56.11"
  web01.vm.provider "virtualbox" do |vb|
     vb.gui = true
     vb.memory = "800"`
   end
end
  
end

After running vagrant up 5 times it started when i vagrant reload it shows the same error

$ vagrant reload
==> db01: Attempting graceful shutdown of VM...
==> db01: Checking if box 'eurolinux-vagrant/centos-stream-9' version '9.0.31' is up to date...
==> db01: Clearing any previously set forwarded ports...
==> db01: Clearing any previously set network interfaces...
==> db01: Preparing network interfaces based on configuration...
    db01: Adapter 1: nat
    db01: Adapter 2: hostonly
==> db01: Forwarding ports...
    db01: 22 (guest) => 2222 (host) (adapter 1)
==> db01: Running 'pre-boot' VM customizations...
==> db01: Booting VM...
==> db01: Waiting for machine to boot. This may take a few minutes...
    db01: SSH address: 127.0.0.1:2222
    db01: SSH username: vagrant
    db01: SSH auth method: private key
==> db01: Machine booted and ready!
==> db01: Checking for guest additions in VM...
    db01: No guest additions were detected on the base box for this VM! Guest
    db01: additions are required for forwarded ports, shared folders, host only
    db01: networking, and more. If SSH fails on this machine, please install
    db01: the guest additions and repackage the box to continue.
    db01:
    db01: This is not an error message; everything may continue to work properly,
    db01: in which case you may ignore this message.
==> db01: Setting hostname...
==> db01: Configuring and enabling network interfaces...
==> db01: Rsyncing folder: /cygdrive/e/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel/ => /vagrant
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /cygdrive/e/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel/
Guest path: /vagrant
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--chmod=ugo=rwX" "--no-perms" "--no-owner" "--no-group" "--rsync-path" "sudo rsync" "-e" "ssh -p 2222 -o LogLevel=FATAL    -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'E:/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel/.vagrant/machines/db01/virtualbox/private_key'" "--exclude" ".vagrant/" "/cygdrive/e/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel/" "[email protected]:/vagrant"
Error: [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [sender=3.2.7]

while siging into the vm using vagrant ssh db01 it prompts for password:

yaswa@Yaswanth-Mitta MINGW64 /e/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel (main)
$ vagrant global-status
id       name   provider   state   directory
------------------------------------------------------------------------------------------------------------------------
2e57b56  db01   virtualbox running E:/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel
073f6bd  mc01   virtualbox running E:/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel
de4bcf9  rmq01  virtualbox running E:/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel
0324a28  app01  virtualbox running E:/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel
bc25597  web01  virtualbox running E:/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel

The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date (use "vagrant global-status --prune" to prune invalid
entries). To interact with any of the machines, you can go to that
directory and run Vagrant, or you can use the ID directly with
Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"

yaswa@Yaswanth-Mitta MINGW64 /e/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel (main)
$ vagrant ssh db01
[email protected]'s password:
[email protected]'s password:
[email protected]'s password:
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

yaswa@Yaswanth-Mitta MINGW64 /e/DEVOPS/projects/project1/vprofile-project/vagrant/Manual_provisioning_WinMacIntel (main)
$ vagrant ssh web01
[email protected]: Permission denied (publickey).

I tried it but no use set VAGRANT_PREFER_SYSTEM_BIN=0

How can I login into vm and how can i resolve that eroor while reloding the vm?

0

There are 0 answers