gpt4 book ai didi

linux - 不使用 KeyPair 无法连接到 Ubuntu ami

转载 作者:太空宇宙 更新时间:2023-11-04 12:38:06 25 4
gpt4 key购买 nike

我已经在 aws 中使用

构建了一个 AMI
Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-0d77397e

现在我可能误解了这一点,但我不想使用 key 对,因为我们在团队中共享这个 ami。它在一个锁定到我们 IP 的安全组中,所以我只想能够使用用户/密码登录

当我尝试连接时,我得到了用户名提示,我在按下回车键时输入了用户名 Ubuntu,我得到了这个提示:

Disconnected: No supported authentication methods available (server sent: publickey)

最佳答案

您可以创建 unix 用户而不是共享 key ,例如1) sudo adduser username -- 它会要求你输入密码和其他详细信息2) 编辑/etc/ssh/sshd_config 设置PasswordAuthentication 是3)重新启动ssh守护进程sudo 服务 ssh 重启

现在通过说 ssh username@ec2_ip 重新登录并输入您刚刚在 1 中创建的密码。

关于linux - 不使用 KeyPair 无法连接到 Ubuntu ami,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41062227/

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