Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows中的自定义漫游SSH_Ssh_Vagrant_Putty - Fatal编程技术网

Windows中的自定义漫游SSH

Windows中的自定义漫游SSH,ssh,vagrant,putty,Ssh,Vagrant,Putty,我正在尝试使用vagrant设置一个新的linux项目。我希望能够使用putty将ssh连接到vagrant box中,因为它具有复制粘贴功能。这就是我到目前为止所做的: 导航到项目目标 在命令提示符中键入 阴道炎 我在文件中更改了以下内容: config.vm.box = "base" config.vm.network "private_network", ip: "192.168.10.12" config.ssh.userna

我正在尝试使用vagrant设置一个新的linux项目。我希望能够使用putty将ssh连接到vagrant box中,因为它具有复制粘贴功能。这就是我到目前为止所做的:

导航到项目目标 在命令提示符中键入

阴道炎

我在文件中更改了以下内容:

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

然后,我在Vagrant文件中添加了以下行:

config.vm.box = "base"
config.vm.network "private_network", ip: "192.168.10.12"
config.ssh.username = "test"
config.ssh.password = "password"
我保存了流浪汉档案

然后在命令提示符下输入

流浪汉

以下是命令提示符中出现的内容:

==> 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.
test@127.0.0.1's password:password
test@127.0.0.1'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.
test@127.0.0.1's password:
test@127.0.0.1'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.
test@127.0.0.1's password:vagrant
test@127.0.0.1's password:vagrant
。。。我要几分钟

    default: Warning: Authentication failure. Retrying...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
test@127.0.0.1'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.
test@127.0.0.1'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.
我尝试使用以下设置通过putty连接到机器,但出现网络错误:连接超时:

主机名:192.168.10.12

端口2201

连接类型:SSH

我尝试使用以下设置通过putty连接到机器,并连接到机器,但系统提示我输入用户名和密码:

主机名:127.0.0.1

端口2201

连接类型:SSH

我尝试的用户名/密码组合是:

login as: test
password: password
我被拒绝访问

login as: ubuntu
password: vagrant
我被拒绝访问

login as: ubuntu
password: vagrant
我如何设置vagrant以便我可以使用putty ssh登录


谢谢你的帮助

虚拟机中没有测试用户,因此您无法使用此用户登录,您必须首先使用密码创建一个测试用户帐户,然后才能连接

此框的ubuntu密码为
95bf98670a543bcd7bdd576c
。您可以在Mac its上的box的vagrant文件中找到此信息,该文件位于
~/.vagrant.d/box/ubuntu-VAGRANTSLASH-xenial64/20170116.1.0/virtualbox/Vagrantfile

您只需从vagrant文件中删除用户名/密码信息,然后在运行
vagrant ssh

时自动登录。请将您的问题移至(删除此处,重新发布)。是的。