fix panic from easyssh-proxy

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2017-05-11 15:14:28 +08:00
parent 699d9148d8
commit a7c37e0936
No known key found for this signature in database
GPG Key ID: 0F84B2110C500B1F
2 changed files with 8 additions and 5 deletions

View File

@ -86,8 +86,9 @@ func getSSHConfig(config DefaultConfig) *ssh.ClientConfig {
} }
if config.Key != "" { if config.Key != "" {
signer, _ := ssh.ParsePrivateKey([]byte(config.Key)) if signer, err := ssh.ParsePrivateKey([]byte(config.Key)); err == nil {
auths = append(auths, ssh.PublicKeys(signer)) auths = append(auths, ssh.PublicKeys(signer))
}
} }
return &ssh.ClientConfig{ return &ssh.ClientConfig{

8
vendor/vendor.json vendored
View File

@ -3,10 +3,12 @@
"ignore": "test", "ignore": "test",
"package": [ "package": [
{ {
"checksumSHA1": "fmzCBkzzkd3KK/yfeMR8IYApkIE=", "checksumSHA1": "YgrgNVNBf7Ro0f3KuiHewOCHrwo=",
"path": "github.com/appleboy/easyssh-proxy", "path": "github.com/appleboy/easyssh-proxy",
"revision": "aa0e30613aeb5cca179bd3982da8d2e06a1bb2a4", "revision": "14882d1d04ac6a85700586997695fcd936470e86",
"revisionTime": "2017-05-10T13:33:00Z" "revisionTime": "2017-05-11T07:07:30Z",
"version": "1.1.5",
"versionExact": "1.1.5"
}, },
{ {
"checksumSHA1": "dvabztWVQX8f6oMLRyv4dLH+TGY=", "checksumSHA1": "dvabztWVQX8f6oMLRyv4dLH+TGY=",