I have tried to create a ubuntu new image using diskimage-builder v1.19.0 but I fail to log into this image using ssh with keys. This only happens when I take the base image from: https://cloud-images.ubuntu.com/xenial/
我曾尝试使用diskimage-builder v1.19.0创建一个ubuntu新映像,但是我无法使用带密钥的ssh登录此映像。这只发生在我从以下网站获取基本图像时:https://cloud-images.ubuntu.com/xenial/
ssh 10.68.32.164 debug1: Connecting to 10.68.32.164 [10.68.32.164] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /home/ubuntu/.ssh/quantum.pem type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ubuntu/.ssh/quantum.pem-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 10.68.32.164:22 as 'ubuntu' debug1: SSH2_MSG_KEXINIT sent Connection reset by 10.68.32.164 port 22
ssh 10.68.32.164 debug1:连接到10.68.32.164 [10.68.32.164]端口22. debug1:已建立连接。 debug1:key_load_public:没有这样的文件或目录debug1:identity文件/home/ubuntu/.ssh/quantum.pem类型-1 debug1:key_load_public:没有这样的文件或目录debug1:identity file /home/ubuntu/.ssh/quantum。 pem-cert类型-1 debug1:为协议2.0启用兼容模式debug1:本地版本字符串SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 debug1:远程协议版本2.0,远程软件版本OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 debug1 :匹配:OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH * compat 0x04000000 debug1:认证为10.68.32.164:22为'ubuntu'debug1:SSH2_MSG_KEXINIT发送连接重置为10.68.32.164端口22
I have tried the same procedure with base images from https://cloud-images.ubuntu.com/vivid/ and this works fine.
我尝试了与https://cloud-images.ubuntu.com/vivid/的基本图像相同的程序,这很好用。
When I mount the resulting xenial image and look in the home directory I notice that there is no ubuntu user, only a devuser. The keys I supplied when instantiating the image is stored under devuser.
当我挂载生成的xenial映像并查看主目录时,我注意到没有ubuntu用户,只有devuser。我在实例化图像时提供的密钥存储在devuser下。
ls -l total 16 drwxr-xr-x 4 root root 4096 Sep 16 09:22 ./ drwxr-xr-x 23 root root 4096 Sep 16 09:22 ../ drwxr-xr-x 3 1001 1001 4096 Sep 16 09:22 devuser/
ls -l total 16 drwxr-xr-x 4 root root 4096 Sep 16 09:22 ./ drwxr-xr-x 23 root root 4096 Sep 16 09:22 ../ drwxr-xr-x 3 1001 1001 4096 Sep 16 09 :22 devuser /
Creating an instance using heat templates with the original ubuntu image is also working fine. No problems to login with ssh.
使用热模板和原始ubuntu映像创建实例也正常。使用ssh登录没问题。
I only have DIB_RELEASE set to xenial and DIB_CLOUD_INIT_DATASOURCES set. DIB_DEV_USER_USERNAME is unset.
我只将DIB_RELEASE设置为xenial并设置了DIB_CLOUD_INIT_DATASOURCES。 DIB_DEV_USER_USERNAME未设置。
What do I need to do to have the ubuntu user created?
如何创建ubuntu用户需要做什么?
Br Mat
Br Mat
1 个解决方案
#1
0
Adding the ubuntu user and the .ssh directory including a key solved the issue.
添加ubuntu用户和包含密钥的.ssh目录解决了这个问题。
#1
0
Adding the ubuntu user and the .ssh directory including a key solved the issue.
添加ubuntu用户和包含密钥的.ssh目录解决了这个问题。