2017-09-20 12 views
0

방랑자를 사용하여 새 Linux 프로젝트를 설정하려고합니다. 복사 붙여 넣기 기능을 가지고 있기 때문에 퍼티가있는 방황 상자에 들어갈 수 있기를 원합니다.Windows의 사용자 지정 Vagrant SSH

config.vm.box = "base" 

에 : 나는이 (가) Vagrantfile에 다음과 같은 변경

탐색을 프로젝트에 명령 프롬프트에서 대상 는

vagrant init

를 입력 : 이것은 내가 지금까지 한 일이다
config.vm.box = "ubuntu/xenial64" 

다음 Vagrantfil에 다음 줄을 추가했습니다. E :

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

은 내가

vagrant up

를 입력 한 명령 프롬프트에서 그런 다음 Vagrantfile에게

저장된 명령 프롬프트에서 오는 어떤이 :

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

... 몇 분만하면 돼.

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. 

나는 시도하고 다음과 같은 설정으로 퍼티를 통해 컴퓨터에 연결하고 내가 네트워크 오류 : 연결 시간 초과 :

Host Name: 192.168.10.12

Port 2201

Connection Type: SSH

나는 시도하고 다음 설정 및 I와 퍼티를 통해 컴퓨터에 연결 컴퓨터에 연결할 수 있지만 사용자 이름과 암호를 입력하라는 메시지가 있어요 :

Host Name: 127.0.0.1

Port 2201

Connection Type: SSH

내가 시도 사용자 이름/암호 조합은 다음과 같습니다

login as: test 
password: password 
,

나는 액세스가 어떻게 설정 방랑자 내가 퍼티에 ssh를 할 수 않도록

거부 ​​얻을 액세스가

login as: ubuntu 
password: vagrant 

을 거부 얻을?

감사합니다.

+0

vagrant ssh을 실행할 때 자동으로 로그인됩니다 [SU] (여기서 삭제하고 거기에 다시 게시하십시오). 그것은 [여기에서 주제를 벗어났습니다] (// stackoverflow.com/help/on-topic). –

답변

1

VM에 테스트 사용자가 없으므로이 사용자로 로그인 할 수 없으므로 먼저 비밀번호가있는 테스트 사용자 계정을 만들어야 만 연결할 수 있습니다.

이 상자의 우분투 암호는 95bf98670a543bcd7bdd576c입니다. 당신은 상자의 Vagrantfile에서이 정보를 찾을 수 있습니다, Mac에서의 당신은 당신의 Vagrantfile에서 사용자 이름/암호 정보를 제거 할 수 있습니다 ~/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20170116.1.0/virtualbox/Vagrantfile

아래에와에 질문을 이동하십시오