首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >docker-machine create不断询问密码。

docker-machine create不断询问密码。
EN

Stack Overflow用户
提问于 2020-03-16 17:07:38
回答 1查看 337关注 0票数 0

我正在尝试docker-machine create到Ubuntu16.04这样的主机上:

代码语言:javascript
复制
    ssh-keygen -R ${remote_host}
    ssh-copy-id -i ~/.ssh/id_host_rsa.pub root@${remote_host}

    docker-machine create \
        --driver generic \
        --generic-ip-address=${remote_host} \
        --generic-ssh-key ~/.ssh/id_host_rsa \
        --generic-ssh-user=root ${machine_name}

版本信息:

代码语言:javascript
复制
docker --version
Docker version 19.03.6, build 369ce74a3c

docker-machine --version
docker-machine version 0.16.2, build bd45ab13

我一再被要求要一个密码。为什么会这样呢?

这是输出:

代码语言:javascript
复制
...

Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: Received disconnect from 77.68.21.66 port 22:2: Too many authentication failures
ERROR: Disconnected from 77.68.21.66 port 22

Running pre-create checks...
Creating machine...
(production) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Password: 
Detecting the provisioner...
Password: 
Provisioning with ubuntu(systemd)...
Password: 

.. etc
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-03-20 15:41:24

造成这个问题的原因是~/.ssh/config的排序。

我首先在config中有一个config条目,在相应的特定服务器Host XX.XX.XX.XX条目之前。

我在~/.ssh/config的末尾移动了通配符条目,现在密码不再被不断地询问,问题现在已经解决了。

我是怎么帮到别人的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60710246

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档