2017-09-20 3 views
0

J'essaye de mettre en place un nouveau projet linux en utilisant vagabond. Je veux être en mesure de ssh dans la zone vagabonde avec putty car il a des capacités de copier coller. Voilà ce que je l'ai fait jusqu'à présent:SSH Vagrant personnalisé dans Windows

Navigated aux projets destination Dans l'invite de commande tapée

vagrant init

J'ai changé ce qui suit dans le Vagrantfile:

config.vm.box = "base" 

à

J'ai ensuite ajouté les lignes suivantes dans le Vagrantfil:
config.vm.box = "ubuntu/xenial64" 

e:

config.vm.network "private_network", ip: "192.168.10.12" 
config.ssh.username = "test" 
config.ssh.password = "password" 

Je sauvé la Vagrantfile

Puis dans l'invite de commande que je tapais

vagrant up

Ce qui est dans l'invite de commande:

==> 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 

... Je veux quelques 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. 

j'essayer de se connecter à la machine par du mastic avec le réglage suivant et j'obtiens une erreur réseau: Connexion a expiré:

Host Name: 192.168.10.12

Port 2201

Connection Type: SSH

j'essayer de se connecter à la machine par du mastic avec le paramètre suivant et je me connecter à la machine, mais je vous demande un nom d'utilisateur et mot de passe:

Host Name: 127.0.0.1

Port 2201

Connection Type: SSH

le nom d'utilisateur/mot de passe combinaison que je tente est:

login as: test 
password: password 

Je reçois un accès refusé

login as: ubuntu 
password: vagrant 

Je reçois un accès refusé

Comment puis-je errante de configuration afin que je puisse ssh avec du mastic?

Nous vous remercions de toute l'aide!

+0

de la boîte S'il vous plaît déplacer votre question [su] (supprimer ici, re-poster là). C'est [hors-sujet ici] (// stackoverflow.com/help/on-topic). –

Répondre

1

Il n'y a pas d'utilisateur de test dans la machine virtuelle, vous ne pouvez donc pas vous connecter avec cet utilisateur, vous devez d'abord créer un compte d'utilisateur de test avec le mot de passe, puis vous pourrez vous connecter.

Le mot de passe ubuntu pour cette boîte est 95bf98670a543bcd7bdd576c. Vous trouverez ces informations dans Vagrantfile, sur Mac son situé sous ~/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20170116.1.0/virtualbox/Vagrantfile

Vous pouvez simplement supprimer les informations nom d'utilisateur/mot de passe de votre Vagrantfile et vous connecter automatiquement lors de l'exécution vagrant ssh