mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
establish SSH connection when adding a new machine
This commit is contained in:
@@ -2,7 +2,6 @@ package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/ed25519"
|
||||
"errors"
|
||||
"fmt"
|
||||
"google.golang.org/grpc"
|
||||
@@ -297,11 +296,3 @@ func (c *ClusterClient) registerNewMachine(
|
||||
}
|
||||
return c.client.AddMachine(ctx, req)
|
||||
}
|
||||
|
||||
func privateKeyFromSecret(s secret.Secret) (ed25519.PrivateKey, error) {
|
||||
// Cluster secret in the config is a hex-encoded private key seed.
|
||||
if len(s) != ed25519.SeedSize {
|
||||
return nil, fmt.Errorf("invalid cluster secret length")
|
||||
}
|
||||
return ed25519.NewKeyFromSeed(s), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user