gpt4 book ai didi

centos - 警告 : Authentication failure. 正在重试

转载 作者:太空宇宙 更新时间:2023-11-03 17:18:31 26 4
gpt4 key购买 nike

我试过了

启动 CentOS 7 虚拟机。以下是我的设置

Vagrant 文件

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.define "zabbix1" do |zabbix1|
zabbix1.vm.box = "centos/7"
zabbix1.vm.hostname = "zabbix1"
zabbix1.ssh.insert_key = false
zabbix1.vm.network :private_network, ip: "10.11.12.55"
zabbix1.ssh.private_key_path = "~/.ssh/id_rsa"
zabbix1.ssh.forward_agent = true
end


end

结果

Vagrant 重载

==> zabbix1: Attempting graceful shutdown of VM...
zabbix1: Guest communication could not be established! This is usually because
zabbix1: SSH is not running, the authentication information was changed,
zabbix1: or some other networking issue. Vagrant will force halt, if
zabbix1: capable.
==> zabbix1: Forcing shutdown of VM...
==> zabbix1: Checking if box 'centos/7' is up to date...
==> zabbix1: Clearing any previously set forwarded ports...
==> zabbix1: Fixed port collision for 22 => 2222. Now on port 2204.
==> zabbix1: Clearing any previously set network interfaces...
==> zabbix1: Preparing network interfaces based on configuration...
zabbix1: Adapter 1: nat
zabbix1: Adapter 2: hostonly
==> zabbix1: Forwarding ports...
zabbix1: 22 (guest) => 2204 (host) (adapter 1)
==> zabbix1: Booting VM...
==> zabbix1: Waiting for machine to boot. This may take a few minutes...
zabbix1: SSH address: 127.0.0.1:2204
zabbix1: SSH username: vagrant
zabbix1: SSH auth method: private key
zabbix1: Warning: Remote connection disconnect. Retrying...
zabbix1: Warning: Remote connection disconnect. Retrying...
zabbix1: Warning: Remote connection disconnect. Retrying...
zabbix1: Warning: Authentication failure. Retrying...
zabbix1: Warning: Authentication failure. Retrying...
zabbix1: Warning: Authentication failure. Retrying...
zabbix1: Warning: Authentication failure. Retrying...
zabbix1: Warning: Authentication failure. Retrying...
zabbix1: Warning: Authentication failure. Retrying...

vagrant ssh-config

Host zabbix1
HostName 127.0.0.1
User vagrant
Port 2204
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/bheng/.ssh/id_rsa
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes

我做错了什么?我错过了什么?

最佳答案

我在同一个盒子上遇到了同样的问题,我修复它的方法是从 VirtualBox 登录虚拟机(vagrant/vagrant 作为用户名/密码)并更改 .ssh/authorized_keys 的权限>

chmod 0600 .ssh/authorized_keys

在运行 vagrant up 之后执行此操作(错误重复出现)并且 VM 已启动,您将看到 vagrant up 将成功完成并且您将能够从 vagrant ssh

ssh 进入虚拟机

关于centos - 警告 : Authentication failure. 正在重试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39124767/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com