Skip to content

Commit fdcfbbc

Browse files
lucabopenshift-merge-robot
authored andcommitted
Revert "mantle: make kola use ecdsa SSH keys"
This reverts commit 5c036d1. That commit broke `kola` on AWS, because that platform only supports RSA keys.
1 parent f5243aa commit fdcfbbc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mantle/network/ssh.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
package network
1616

1717
import (
18-
"crypto/ecdsa"
19-
"crypto/elliptic"
2018
"crypto/rand"
19+
"crypto/rsa"
2120
"fmt"
2221
"io/ioutil"
2322
"net"
@@ -31,6 +30,7 @@ import (
3130
const (
3231
defaultPort = 22
3332
defaultUser = "core"
33+
rsaKeySize = 2048
3434
)
3535

3636
// DefaultSSHDir is a process-global path that can be set, and
@@ -57,7 +57,7 @@ type SSHAgent struct {
5757
// NewSSHAgent constructs a new SSHAgent using dialer to create ssh
5858
// connections.
5959
func NewSSHAgent(dialer Dialer) (*SSHAgent, error) {
60-
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
60+
key, err := rsa.GenerateKey(rand.Reader, rsaKeySize)
6161
if err != nil {
6262
return nil, err
6363
}

mantle/platform/conf/conf_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestConfCopyKey(t *testing.T) {
5252

5353
str := conf.String()
5454

55-
if !strings.Contains(str, "ecdsa-sha2-nistp256 ") || !strings.Contains(str, " core@default") {
55+
if !strings.Contains(str, "ssh-rsa ") || !strings.Contains(str, " core@default") {
5656
t.Errorf("ssh public key not found in config %d: %s", i, str)
5757
continue
5858
}

0 commit comments

Comments
 (0)