2015-04-03 55 views
0

步驟我迄今所做的: 我已經下載了VirtualBox和VagrantOn我的Windows7 在我的本地機器,我做在C目錄:驅動器 - 在>的mkdir SitesVM Windows命令行CD'ed到SitesVM,做 流浪漢初始化 無業遊民了 流浪漢SSH如何訪問使用放浪我的VirtualBox的Windows 7上

這是彈出

C:\SitesVM>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:/SitesVM/.vagrant/machines/default/virtualbox/private_key 

我已經安裝了Cygwin的建議,但Cygwin的一定不能COMMUNIC因爲它沒有通過Cygwin命令行提供的任何文件。

我在這裏錯過了什麼?

回答

0

Cygwin工具(如ssh)將從Cygwin命令行運行,但不是Windows命令行。

從您當前工作的Window命令行執行vagrant destroy或至少一個vagrant suspend。然後嘗試啓動Cygwin終端,切換到相同的目錄(cd /cygdrive/c/SitesVM),然後從那裏再次啓動虛擬機(vagrant up)。

現在,您應該可以使用Cygwin bash shell中的vagrant ssh

(不是所有的,這是絕對必要的,但它會更容易繼續從bash shell的工作。)

如果仍然不行,則可能無法安裝SSH。

從Cygwin命令行輸入ssh。您應該看到:

$ ssh 
usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] 
      [-D [bind_address:]port] [-E log_file] [-e escape_char] 
      [-F configfile] [-I pkcs11] [-i identity_file] 
      [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] 
      [-O ctl_cmd] [-o option] [-p port] 
      [-Q cipher | cipher-auth | mac | kex | key] 
      [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] 
      [-w local_tun[:remote_tun]] [[email protected]]hostname [command] 

如果Cygwin SSH客戶端安裝正確。

如果說-bash: ssh: command not found,進入Cygwin的安裝程序(setup-x86.exesetup-x86_64.exe),並在選擇軟件包的屏幕,搜索openssh。從Skip切換到版本(現在6.8p1-1)並點擊下一步。這將在Cygwin中安裝ssh客戶端。

+0

看起來事情正朝着正確的方向發展。在運行vagrant之後,ithen立即運行vagrant ssh並得到如上所述的未找到的以下ssh可執行文件。有什麼建議麼 ? – Elmeroperro 2015-04-03 16:14:22

+0

非常感謝。有效。在我看來,如何在自己的世界中找到自己的想法?!?!?!?!? – Elmeroperro 2015-04-03 17:37:49