web-dev-qa-db-fra.com

Exécutable `ssh` introuvable dans aucun répertoire du% PATH%

ERREUR:

c:\Users\dhawal.vora>vagrant ssh
`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: c:/Users/dhawal.vora/.vagrant/machines/default/virtualbox/private_key

Aide aimablement????

Le fichier Vagrant est en dessous-

# -*- mode: Ruby -*-
# vi: set ft=Ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "precise32"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the Host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, Host: 8080

# Create a private network, which allows Host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the Host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
#   # Display the VirtualBox GUI when booting the machine
#   vb.gui = true
#
#   # Customize the amount of memory on the VM:
#   vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other Push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/Push/atlas.html for more information.
# config.Push.define "atlas" do |Push|
#   Push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a Shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "Shell", inline <<-Shell
Sudo apt-get install Apache2
# Shell
end
32
voraD

Ajouter C:\Program Files\Git\usr\bin à la variable d'environnement PATH.

Ajoutez-le manuellement ou je pense que vous pouvez l'exécuter en cmd:

set PATH=%PATH%;C:\Program Files\Git\usr\bin

mis à jour à partir des commentaires de @Ygor Thomaz

ou (64 bits)

set PATH=%PATH%;C:\Program Files\Git\usr\bin 

Si cela ne résout pas votre problème, passez par:

Faire fonctionner SSH sur Vagrant/Windows/Git

83
BMW

Vous pouvez également installer openssh à partir de ici puis vous pouvez ajouter le ssh.exe à votre CHEMIN par:

set PATH=%PATH%;C:\Program Files (x86)\OpenSSH\bin

ou

set PATH=%PATH%;C:\Program Files\OpenSSH\bin
2
Nima Soroush

Avec Windows 10, je ne pouvais pas non plus faire fonctionner l'option 'set PATH'. Mais lorsque j'ai modifié la variable PATH via les paramètres système et lancé une nouvelle invite de commande, cela a bien fonctionné.

De plus, PuTTY a parfaitement fonctionné après avoir lu l'écran qui m'a dit d'utiliser un nom d'utilisateur de "core".

'core' était une exigence de ma configuration qui essayait de lancer CoreOS.

1
Paul Pritchard

L'ajout de C:\Program Files\Git\usr\bin à la variable d'environnement PATH n'a pas fonctionné pour moi. J'ai donc configuré PuTTY pour la connexion ssh.

0
Alyona Pugachova

Dans mon cas, même l'ajout de ssh au PATH n'a pas résolu le problème. Ce que je devais faire était de me connecter manuellement à vagrant avec ssh. Après avoir exécuté vagrant up, au lieu d'exécuter vagrant ssh, je fais ceci:

ssh [email protected] -p 2222

Et le mot de passe est "vagabond"

Pour obtenir toutes les informations sur l'ip, le port et l'utilisateur que vous pouvez utiliser

vagrant ssh-config

Ope cela aide quelqu'un ...

0
cancerbero

Ce didacticiel illustratif bien rédigé donne un excellent aperçu des moyens de configurer Vagrant SSH. La première est via Git et la seconde décrit comment utiliser PuTTY. C'est très simple à suivre.

Exécution de Vagrant SSH sur Windows

0
Cale Sweeney