Подтвердить что ты не робот

Ошибка аутентификации CoreOS при переходе вверх

Я попытался использовать CoreOS сегодня. Поэтому я просто попытался следовать Руководству по началу работы и выполнил следующие команды:

git clone https://github.com/coreos/coreos-vagrant.git

cd coreos-vagrant

vagrant up

В папке coreos-vagrant есть некоторый ресурс конфигурации, например: config.rb & amp;

пользователем данныеconfig.rb:

$update_channel='alpha'

пользователем данные:

#cloud-config

coreos:
  etcd:
    addr: $public_ipv4:4001
    peer-addr: $public_ipv4:7001
  fleet:
    public-ip: $public_ipv4
  units:
    - name: etcd.service
      command: start
    - name: fleet.service
      command: start

users:
  - name: carbonell
    passwd: $1$BulVX1y9$8W/3RHZAed3fb.wmbZYGi0
    groups:
      - docker

Результат команды:

[email protected]:~/workspace/coreos-vagrant$ vagrant up
Bringing machine 'core-01' up with 'virtualbox' provider...
==> core-01: Importing base box 'coreos-alpha'...
==> core-01: Matching MAC address for NAT networking...
==> core-01: Setting the name of the VM: coreos-vagrant_core-01_1405929178704_22375
==> core-01: Clearing any previously set network interfaces...
==> core-01: Preparing network interfaces based on configuration...
    core-01: Adapter 1: nat
    core-01: Adapter 2: hostonly
==> core-01: Forwarding ports...
    core-01: 22 => 2222 (adapter 1)
==> core-01: Running 'pre-boot' VM customizations...
==> core-01: Booting VM...
==> core-01: Waiting for machine to boot. This may take a few minutes...
    core-01: SSH address: 127.0.0.1:2222
    core-01: SSH username: vagrant
    core-01: SSH auth method: private key
    core-01: Warning: Connection timeout. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
    core-01: Warning: Authentication failure. Retrying...
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.

Вторичная ссылка: https://github.com/coreos/coreos-vagrant.git

4b9b3361

Ответ 1

Вы добавили ключ ssh для Vagrant?

$ ssh-add ~/.vagrant.d/insecure_private_key
Identity added: /Users/core/.vagrant.d/insecure_private_key (/Users/core/.vagrant.d/insecure_private_key)
$ vagrant ssh core-01 -- -A

ссылка: http://coreos.com/docs/quickstart/

Ответ 2

Vagrant имеет функцию замены небезопасного закрытого ключа при запуске:

core-01: 
core-01: Vagrant insecure key detected. Vagrant will automatically replace
core-01: this with a newly generated keypair for better security.
core-01: 
core-01: Inserting generated public key within guest...
core-01: Removing insecure key from the guest if its present...
core-01: Key inserted! Disconnecting and reconnecting using new SSH key...

однако каким-то образом в CoreOS замененный закрытый ключ теряется на vagrant reload, поэтому помогает удалить закрытый ключ компьютера, например,.

rm .vagrant/machines/core-01/virtualbox/private_key

Ответ 3

для меня это было решено путем изменения прав доступа к папке .ssh в vagrant home directort (то есть "~ vagrant/.ssh"). Я думаю, что испортил разрешения, когда настраивал ssh-ключи для своего приложения.

Похоже, что файл authorized_keys должен быть rw только для пользователя vagrant, поэтому "chmod 600 authorized_keys"; то же самое касается самого каталога и его родителя:

так:

chmod 600 authorized_keys
chmod 700 .
chmod 700 ..

Только после того, как я восстановил все эти разрешения, vagrant ssh снова начал работать.

Я думаю, что это как-то связано с безопасностью SSH. Он отказывается распознавать сертификаты, если они каким-либо образом доступны за пределами текущего пользователя, поэтому попытки vagrants войти в систему, таким образом, отклоняются.