1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113 | root@a5:~# cat /run/bootcmd.txt
BOOTCMD: Mon, 02 Oct 2017 16:37:41 +0000: a5
root@a5:~# cat /run/boothook.txt
BOOTHOOK: Mon, 02 Oct 2017 16:37:41 +0000: this is called every boot.
root@a5:~# cat /var/lib/cloud/instance/cloud-config.txt
#cloud-config
# from 1 files
# part-002
---
bootcmd:
- - sh
- -c
- 'echo "BOOTCMD: $(date -R): $INSTANCE_ID" | tee /run/bootcmd.txt'
...
root@a5:~# cat /var/log/cloud-init-output.log
Cloud-init v. 17.1 running 'init-local' at Mon, 02 Oct 2017 16:37:36 +0000. Up 1.00 seconds.
BOOTCMD: Mon, 02 Oct 2017 16:37:41 +0000: a5
Cloud-init v. 17.1 running 'init' at Mon, 02 Oct 2017 16:37:41 +0000. Up 6.00 seconds.
ci-info: +++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++
ci-info: +--------+------+---------------+---------------+-------+-------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: +--------+------+---------------+---------------+-------+-------------------+
ci-info: | eth0: | True | 10.75.205.226 | 255.255.255.0 | . | 00:16:3e:4a:a5:4b |
ci-info: | eth0: | True | . | . | d | 00:16:3e:4a:a5:4b |
ci-info: | lo: | True | 127.0.0.1 | 255.0.0.0 | . | . |
ci-info: | lo: | True | . | . | d | . |
ci-info: +--------+------+---------------+---------------+-------+-------------------+
ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
ci-info: | 0 | 0.0.0.0 | 10.75.205.1 | 0.0.0.0 | eth0 | UG |
ci-info: | 1 | 10.75.205.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
ci-info: | 2 | 10.75.205.1 | 0.0.0.0 | 255.255.255.255 | eth0 | UH |
ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
SHA256:TFix5vh07wyHZ1KvCgVKFV5awhjLMChEVXHM50lTMps root@a5
The key's randomart image is:
+---[RSA 2048]----+
|oo.o+o==*=+. |
|. . +oO.X= |
| . = @Eo |
| . B + |
| o S o . |
| o o + . |
| o + = . |
| . O . |
| ..+ |
+----[SHA256]-----+
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
SHA256:fGiUiyB228V2amP6b6DgRwXXhFLAsk2tvhtjyQ+/YE8 root@a5
The key's randomart image is:
+---[DSA 1024]----+
| ..+.+. |
| . =.+.. |
| o o= =* . |
| . o.+o*.= |
| ..o.S . |
| ..o*.o |
| . o@oE. |
| .o+@ . |
| ...*+. |
+----[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
The key fingerprint is:
SHA256:L6JMFK3QsMnmUn3apeVzkSVZIxB8TQ2gXrEAGrRYGtA root@a5
The key's randomart image is:
+---[ECDSA 256]---+
|.oo.+ .o+o=**o |
| .E@ = .ooB... |
| X * o +.= |
| + . * * . . |
|. . + o S . |
| . . + |
| . . . . |
| o . . . |
| o |
+----[SHA256]-----+
Generating public/private ed25519 key pair.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
The key fingerprint is:
SHA256:hKLd0CveCCNtLu9IWZW4UHgjORGuxIAnBfvU8yjYzyc root@a5
The key's randomart image is:
+--[ED25519 256]--+
|+=*. |
|**o+.... |
|.B=.*oo . |
|o*.ooB o |
|+ Xo+ + S |
| +oB + |
|.o. E o |
|.+ o |
|..o |
+----[SHA256]-----+
Cloud-init v. 17.1 running 'modules:config' at Mon, 02 Oct 2017 16:37:42 +0000. Up 8.00 seconds.
Cloud-init v. 17.1 running 'modules:final' at Mon, 02 Oct 2017 16:37:43 +0000. Up 9.00 seconds.
ci-info: no authorized ssh keys fingerprints found for user ubuntu.
Cloud-init v. 17.1 finished at Mon, 02 Oct 2017 16:37:43 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]. Up 9.00 seconds
|