Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

edssh

ed25519 signature support for golang.org/x/crypto/ssh

This repo can be used as a drop-in replacement for ssh.ParsePrivateKey. for example, it can be used like this:

import (
  "github.com/fudanchii/edssh"
)

// ...

func connectSSH(addr string) {
	pk, err := ioutil.ReadFile(privkeyFile)
	if err != nil {
		log.Fatal(err.Error())
	}
	signer, err := edssh.ParsePrivateKey(pk)
	if err != nil {
		log.Fatal(err.Error())
	}

	for {
		if _, ok := <-sshReconnect; !ok {
			close(sshClientChannel)
			return
		}
		client, err := ssh.Dial("tcp", addr, &ssh.ClientConfig{
			User: remoteUser,
			Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)},
		})
		if err != nil {
			log.Fatal(err.Error())
		}
		sshClientChannel <- client
		logInfo("connected to " + addr)
	}
}

About

ed25519 signature support for golang.org/x/crypto/ssh

Resources

Releases

No releases published

Languages

You can’t perform that action at this time.