summaryrefslogtreecommitdiff
path: root/pkg/machine/ignition.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-02 14:32:08 +0200
committerGitHub <noreply@github.com>2021-04-02 14:32:08 +0200
commit3ae42358e13a25abdb1caa65c529e8171804095c (patch)
tree8ae54ed3d0ce034b1d3a9ba011a6239542735308 /pkg/machine/ignition.go
parent203e464f93e2ca7054b58e2aabc13afa6dec4a8c (diff)
parentf8bc391e349f8e67ad35c802be4c99dc3eabe4a2 (diff)
downloadpodman-3ae42358e13a25abdb1caa65c529e8171804095c.tar.gz
podman-3ae42358e13a25abdb1caa65c529e8171804095c.tar.bz2
podman-3ae42358e13a25abdb1caa65c529e8171804095c.zip
Merge pull request #9920 from ashley-cui/rooty
[NO TESTS NEEDED] Add ssh connection to root user
Diffstat (limited to 'pkg/machine/ignition.go')
-rw-r--r--pkg/machine/ignition.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go
index a68d68ac3..cc5c01de6 100644
--- a/pkg/machine/ignition.go
+++ b/pkg/machine/ignition.go
@@ -55,10 +55,16 @@ func NewIgnitionFile(ign DynamicIgnition) error {
}
ignPassword := Passwd{
- Users: []PasswdUser{{
- Name: ign.Name,
- SSHAuthorizedKeys: []SSHAuthorizedKey{SSHAuthorizedKey(ign.Key)},
- }},
+ Users: []PasswdUser{
+ {
+ Name: ign.Name,
+ SSHAuthorizedKeys: []SSHAuthorizedKey{SSHAuthorizedKey(ign.Key)},
+ },
+ {
+ Name: "root",
+ SSHAuthorizedKeys: []SSHAuthorizedKey{SSHAuthorizedKey(ign.Key)},
+ },
+ },
}
ignStorage := Storage{