go/net/ssh: allow multiple AuthMethods

Change-Id: Icdd8c12bc959f87271db4abba3219edd0ea1b7ca
Reviewed-on: https://review.monogon.dev/c/monogon/+/3434
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/cloud/shepherd/mini/ssh.go b/cloud/shepherd/mini/ssh.go
index 1a2d23c..bf2e996 100644
--- a/cloud/shepherd/mini/ssh.go
+++ b/cloud/shepherd/mini/ssh.go
@@ -48,7 +48,7 @@
 
 	switch {
 	case sc.Pass != "":
-		c.AuthMethod = xssh.Password(sc.Pass)
+		c.AuthMethods = []xssh.AuthMethod{xssh.Password(sc.Pass)}
 	case sc.SSHKey.KeyPersistPath != "":
 		signer, err := sc.SSHKey.Signer()
 		if err != nil {
@@ -62,7 +62,7 @@
 
 		klog.Infof("Using ssh key auth with public key: %s", pubKey)
 
-		c.AuthMethod = xssh.PublicKeys(signer)
+		c.AuthMethods = []xssh.AuthMethod{xssh.PublicKeys(signer)}
 	}
 	return &c, nil
 }