101
101
func (s *SSHGoCryptoCommandSuite) TestClientNoKeys(c *gc.C) {
102
102
client, err := ssh.NewGoCryptoClient()
104
cmd := client.Command("test.invalid", []string{"echo", "123"}, nil)
104
cmd := client.Command("0.1.2.3", []string{"echo", "123"}, nil)
106
106
c.Assert(err, gc.ErrorMatches, "no private keys available")
107
107
defer ssh.ClearClientKeys()
108
108
err = ssh.LoadClientKeys(c.MkDir())
110
cmd = client.Command("test.invalid", []string{"echo", "123"}, nil)
110
cmd = client.Command("0.1.2.3", []string{"echo", "123"}, nil)
112
112
// error message differs based on whether using cgo or not
116
116
func (s *SSHGoCryptoCommandSuite) TestCommand(c *gc.C) {