今天我想要,juju boostrap
所以我执行 ssh-keygen 并得到这个
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hsf/.ssh/id_rsa): key
Enter passphrase (empty for no passphrase): ubuntu
Enter same passphrase again: ubuntu
Your identification has been saved in key.
Your public key has been saved in key.pub.
The key fingerprint is:
7e:d2:df:66:f5:2f:92:02:ad:10:67:b7:10:cd:33:03 hsf@ubuntu-server
The key's randomart image is:
+--[ RSA 2048]----+
| E+ |
| . * |
| . + |
| . + . |
| +S+ . |
| ....o .|
| .ooo . ..|
| .o..o.+ .|
| ..+..o|
+-----------------+
然后我将我的公钥复制到 key.pub 中,如下所示:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC89zkec0YhwYuUmjB6oxmLGmzH2nCvJMF0mjigodxN$
到 maas 仪表板:按“添加 SSH 密钥”并复制并添加密钥。
所以现在我想引导并得到以下信息:
2012-08-27 13:02:02,923 INFO Bootstrapping environment 'maas' (origin: distro type: maas)...
2012-08-27 13:02:05,935 ERROR Failed to launch machine /MAAS/api/1.0/nodes/node-3c4b1752-f031-11e1-bd44-001185e67955/; attempting to release.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/juju/providers/maas/launch.py", line 44, in start_machine
cloud_init = self._create_cloud_init(machine_id, zookeepers)
File "/usr/lib/python2.7/dist-packages/juju/providers/common/launch.py", line 95, in _create_cloud_init
cloud_init.add_ssh_key(get_user_authorized_keys(config))
File "/usr/lib/python2.7/dist-packages/juju/providers/common/utils.py", line 84, in get_user_authorized_keys
raise LookupError("SSH authorized/public key not found.")
LookupError: SSH authorized/public key not found.
SSH authorized/public key not found.
2012-08-27 13:02:11,969 ERROR SSH authorized/public key not found.
我不知道该怎么办。请帮帮我。
答案1
你做错了两件事:
- 使用 Juju 时,您无需将 SSH 密钥放入 MAAS,Juju 会为您处理所有这些。
2.
输入保存密钥的文件(/home/hsf/.ssh/id_rsa):key
让它将文件写入默认位置。然后 Juju 会找到它并使用它。