Skip to content

Commit

Permalink
feature: add banner callback
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezvara committed Apr 29, 2022
1 parent 90b5fa4 commit ee51821
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ type Client struct {

// Config for Client.
type Config struct {
Auth Auth
User string
Addr string
Port uint
Timeout time.Duration
Callback ssh.HostKeyCallback
Auth Auth
User string
Addr string
Port uint
Timeout time.Duration
Callback ssh.HostKeyCallback
BannerCallback ssh.BannerCallback
}

// DefaultTimeout is the timeout of ssh client connection.
Expand Down Expand Up @@ -87,6 +88,7 @@ func Dial(proto string, c *Config) (*ssh.Client, error) {
Auth: c.Auth,
Timeout: c.Timeout,
HostKeyCallback: c.Callback,
BannerCallback: c.BannerCallback,
})
}

Expand Down

0 comments on commit ee51821

Please sign in to comment.