Skip to content

Revert "mantle: make kola use ecdsa SSH keys" #1767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mantle/network/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
package network

import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"fmt"
"io/ioutil"
"net"
Expand All @@ -31,6 +30,7 @@ import (
const (
defaultPort = 22
defaultUser = "core"
rsaKeySize = 2048
)

// DefaultSSHDir is a process-global path that can be set, and
Expand All @@ -57,7 +57,7 @@ type SSHAgent struct {
// NewSSHAgent constructs a new SSHAgent using dialer to create ssh
// connections.
func NewSSHAgent(dialer Dialer) (*SSHAgent, error) {
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
key, err := rsa.GenerateKey(rand.Reader, rsaKeySize)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion mantle/platform/conf/conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestConfCopyKey(t *testing.T) {

str := conf.String()

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