Vấn đề với xác thực ssh:
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
Tôi có thể Ctrl+Cra khỏi vòng xác thực và sau đó ssh thành công bằng tay.
Tôi đã thực hiện các bước sau trên hộp khách:
Kích hoạt
Remote LoginchoAll Users.Tạo
~/.sshthư mục với0700quyền.Tạo
~/.ssh/authorized_keystập tin với0600quyền.Dán khóa công khai này vào
~/.ssh/authorized_keys
Tôi cũng đã thử sử dụng mạng riêng (hostonly) thay vì mạng công cộng (bắc cầu), sử dụng dòng này trong Vagrantfile:
config.vm.network "private_network", ip: "172.16.177.7"
Tôi nhận được cùng một đầu ra (ngoại trừ Adapter 2: hostonly) nhưng sau đó không thể ssh bằng tay.
Tôi cũng đã thử config.vm.network "private_network", ip: "10.0.0.100".
Tôi cũng đã thử thiết lập config.ssh.passwordtrong Vagrantfile. Điều này không đầu ra SSH auth method: passwordnhưng vẫn không xác thực.
Và tôi cũng đã thử xây dựng lại chiếc hộp và kiểm tra lại tất cả những thứ trên.
Có vẻ như những người khác đã thành công với cấu hình này , vì vậy phải có điều gì đó tôi đang làm sai.
Tôi đã tìm thấy chủ đề này và kích hoạt GUI, nhưng điều đó không có ích.

config.ssh.private_key_path = "~/.ssh/id_rsa"phải loại bỏ dòng này để thực hiện công việc cung cấp