I am trying to setup a new linux project using vagrant. I want to be able to ssh into the vagrant box with putty because it has copy paste capabilities. This is what I have done so far:
Navigated to the projects destination In the command prompt typed
vagrant init
I changed the following in the Vagrantfile:
config.vm.box = "base"
to
config.vm.box = "ubuntu/xenial64"
I then added the following lines into the Vagrantfile:
config.vm.network "private_network", ip: "192.168.10.12"
config.ssh.username = "test"
config.ssh.password = "password"
I saved the Vagrantfile
Then in the command prompt I typed
vagrant up
This what comes up in the command prompt:
==> default: Importing base box 'ubuntu/xenial64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: A newer version of the box 'ubuntu/xenial64' is available! You currently
==> default: have version '20170822.0.0'. The latest is version '20170919.0.0'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: geoserver_default_1505948268591_35426
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2201 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2201
default: SSH username: test
default: SSH auth method: password
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
[email protected]'s password:password
[email protected]'s password:password
default: Warning: Authentication failure. Retrying...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
[email protected]'s password:
[email protected]'s password:
default: Warning: Authentication failure. Retrying...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
[email protected]'s password:vagrant
[email protected]'s password:vagrant
... I want a few minutes
default: Warning: Authentication failure. Retrying...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
[email protected]'s password: default: Warning: Connection timeout. Retrying...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
[email protected]'s password:Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
I try and connect to the machine through putty with the following setting and I get a Network error: Connection timed out:
Host Name: 192.168.10.12
Port 2201
Connection Type: SSH
I try and connect to the machine through putty with the following setting and I get connect to the machine but I am prompted for a username and password:
Host Name: 127.0.0.1
Port 2201
Connection Type: SSH
The username/password combination I try is:
login as: test
password: password
I get an Access denied
login as: ubuntu
password: vagrant
I get an Access denied
How do I setup vagrant so that I can ssh in with putty?
Thank you for any and all help!