juju: github.com/juju/juju/network/ssh/testing Index | Files

package testing

import "github.com/juju/juju/network/ssh/testing"

Index

Package Files

sshserver.go

Variables

var SSHKey1 = "" /* 229 byte string literal not displayed */

SSHKey1 generated with `ssh-keygen -b 256 -C test-only -t ecdsa -f test-key`

var SSHKey2 = "" /* 401 byte string literal not displayed */

SSHKey2 generated with `ssh-keygen -b 256 -C test-only -t ed25519 -f test-key`

var SSHPub1 = "" /* 172 byte string literal not displayed */
var SSHPub2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA2TeJHVWtOwR8jJANeStlqO04jCYoF3P6EA33RVd3E5 test-only"

func CreateSSHServer Uses

func CreateSSHServer(c *gc.C, privateKeys ...string) (string, chan struct{})

CreateSSHServer launches an SSH server that will use the described private key to allow SSH connections. Note that it explicitly doesn't actually support any Auth mechanisms, so nobody can complete connections, but it will do Key exchange to set up the encrypted conversation. We return the address where the SSH service is listening, and a channel callers must close when they want the service to stop.

func CreateTCPServer Uses

func CreateTCPServer(c *gc.C, callback func(net.Conn)) (string, chan struct{})

CreateTCPServer launches a TCP server that just Accepts connections and triggers the callback function. The callback assumes responsibility for closing the connection. We return the address+port of the TCP server, and a channel that can be closed when you want the TCP server to stop.

Package testing imports 6 packages (graph). Updated 2017-02-15. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).