繁体   English   中英

使用厨师创建的Linux azure vm在尝试引导甚至给出rsa文件时询问ssh密码?

[英]linux azure vm created using chef asking ssh password while trying to bootstrap even rsa file is given?

用于创建实例的代码

knife azure server create  --azure-dns-name 'azurelocalinstance' --azure-vm-name 'LinuxInstance' --azure-vm-size Medium -I 03f55de797f546a1b29d1b8d66be687a__Jenkins272-Ubuntu1404LTS2016-09-13 --azure-service-location "Southeast Asia" --ssh-user myuser --identity-file D:/ACE_Dev/Keys/AZURE_LINUX_KEYS/azure_linux_id_rsa

Waiting for virtual machine to reach status 'provisioning'.................vm state 'provisioning' reached after 2.87 minutes.

DNS Name: azurelocalinstance.cloudapp.net
VM Name: LinuxInstance
Size: Medium
Azure Source Image: 03f55de797f546a1b29d1b8d66be687a__Jenkins272-Ubuntu1404LTS2016-09-13
Azure Service Location: Southeast Asia
Public Ip Address: 13.76.143.3
Private Ip Address: 100.104.98.32
SSH Port: 22
Environment: _default

Waiting for sshd on 13.76.143.3:22done

Connecting to 13.76.143.3
Password: 
Failed to authenticate myuser - trying password auth
Enter your password:
ERROR: Net::SSH::AuthenticationFailed: Authentication failed for user myuser@13.76.143.3@13.76.143.3

即使指定了rsa文件,我尝试引导ssh身份验证时遇到的错误也是错误

rsa密钥由以下代码生成

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

任何帮助都需要提前感谢

您还需要在Azure端配置SSH密钥。 如果未将服务器配置为接受私钥,则仅提供私钥不会有任何作用。 如果密钥失败(模仿OpenSSH的行为),则刀将自动退回到密码身份验证。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM