Skip to content

Conversation

@mhbahmani
Copy link

No description provided.

@mhbahmani mhbahmani closed this Jan 20, 2022
@mhbahmani
Copy link
Author

Closes #29

@mhbahmani mhbahmani reopened this Jan 20, 2022
@melbahja
Copy link
Owner

Can you use net.SplitHostPort ? and make the default port 22

@mhbahmani
Copy link
Author

Now check it out please.

@SegFault42
Copy link

Possible to merge it please ?

@melbahja
Copy link
Owner

This will break v1, it's gonna be in v2

Alternately if you want to connect to a custom port u can do:

user := "user"
addr := "127.0.0.1"
port := 22
// auth := your auth 

callback, err := goph.DefaultKnownHosts()
if err != nil {
   // handle err
}

client, err := goph.NewConn(&goph.Config{
  User:     user,
  Addr:     addr,
  Port:     port,
  Auth:     auth,
  Timeout:  goph.DefaultTimeout,
  Callback: callback,
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants