Add new CLI option to disable SSH connections

This commit is contained in:
Dan Sosedoff
2017-09-26 23:56:27 -05:00
parent e7a7e02626
commit b1dd4b5308
2 changed files with 4 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ func NewFromUrl(url string, sshInfo *shared.SSHInfo) (*Client, error) {
var tunnel *Tunnel
if sshInfo != nil {
if command.Opts.DisableSSH {
return nil, fmt.Errorf("ssh connections are disabled")
}
if command.Opts.Debug {
fmt.Println("Opening SSH tunnel for:", sshInfo)
}