From f8bc391e349f8e67ad35c802be4c99dc3eabe4a2 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Thu, 1 Apr 2021 13:31:42 -0400 Subject: Add ssh connection to root user When initing a VM, create two add connections - one to user, one to root. podman machine remove removes both connections as well. [NO TESTS NEEDED] Signed-off-by: Ashley Cui --- pkg/machine/ignition.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pkg/machine/ignition.go') 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{ -- cgit v1.2.3-54-g00ecf