Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant ssh asks password however able to login using usual ssh command #6243

Closed
coolbrg opened this issue Sep 7, 2015 · 5 comments
Closed

Comments

@coolbrg
Copy link

coolbrg commented Sep 7, 2015

Hi Folks,

I am having a weird issue of "Vagrant ssh prompt password".
I searched above and tried those solutions which normally didn't work in my case.

My issue is:
vagrant ssh asks password.

However, ssh using following command:
ssh vagrant@127.0.0.1 -p 2222
works fine.

But ssh vagrant@127.0.0.1 again asks password.

With this what I understand is my port configuration has messed up.

My vagrant ssh-config show:

$ vagrant ssh-config
Host aquarium
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /home/budhram/vertis/atlantis-project/repos/atlantis-aquarium/vagrant-id_rsa
  IdentitiesOnly yes
  LogLevel FATAL

Any idea what might be wrong here?

@sethvargo
Copy link
Contributor

Hi @budhrg

Can you please share your Vagrantfile?

@coolbrg
Copy link
Author

coolbrg commented Sep 8, 2015

https://github.com/ooyala/atlantis-aquarium/blob/stabilize/Vagrantfile


hostname = "atlantis-aquarium-vm"
domain   = "local"

Vagrant.configure("2") do |config|
  config.ssh.private_key_path = "./vagrant-id_rsa"
  config.vm.define "aquarium" do |aquarium|
    #aquarium.vm.box = ENV["ATLANTIS_VM_BOX"] || "atlantis"
    #aquarium.vm.box_url = "/tmp/atlantis-aquarium.box"
    aquarium.vm.box = "ghao/atlantis-aquarium"

    aquarium.vm.hostname = [hostname,domain].join('.')
    aquarium.vm.provider "virtualbox" do |v|
      v.customize ["modifyvm", :id, "--memory", 2048]
      v.customize ["modifyvm", :id, "--cpus", 4]
    end

    # Mounts for Atlantis
    #aquarium.vm.synced_folder (ENV['ATLANTIS_REPO_ROOT'] || "#{ENV['HOME']}/repos"), "/home/vagrant/repos"
    aquarium.vm.synced_folder "#{ENV['HOME']}/repos", "/home/vagrant/repos"

    # Caching
    aquarium.vm.synced_folder "http-cache", "/var/spool/squid3", :owner => "proxy", :group => "proxy"

    # Convenience for storing data across restarts
    aquarium.vm.synced_folder "data", "/home/vagrant/data"

    # Allow controller to be run inside VM
    # TODO(edanaher): This should be done by installing the gem in the VM
    aquarium.vm.synced_folder "bin", "/home/vagrant/bin"
    aquarium.vm.synced_folder "lib", "/home/vagrant/lib"

    # Forward some useful Atlantis ports for convenience
    aquarium.vm.network "forwarded_port", guest: 443, host: 20443
    aquarium.vm.network "forwarded_port", guest: 8000, host: 28000
    aquarium.vm.network "forwarded_port", guest: 8080, host: 28080
    aquarium.vm.network "forwarded_port", guest: 8081, host: 28081
  end
end

@sethvargo
Copy link
Contributor

Hi @budhrg

This looks to be a problem with the box. Can you try one of the recommended boxes like hashicorp/precise64 or bento/ubuntu-14.04 and see if the issue persists there? Unfortunately I do not have access to your box to play with it locally.

@sethvargo
Copy link
Contributor

Hi @budhrg,

Were you able to try a different box (such as hashicorp/precise64) and see if that resolves the issue?

@mitchellh
Copy link
Contributor

Closing due to lack of response. Sorry! Please reopen a new issue if you have a response to the above.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants