Update module github.com/melbahja/goph to v2 #82

Open
renovate_bot wants to merge 1 commit from renovate/github.com-melbahja-goph-2.x into master
renovate_bot commented 2026-07-16 07:55:43 +00:00 (Migrated from jonasled.dev)

This MR contains the following updates:

Package Change Age Confidence
github.com/melbahja/goph v1.5.2 → v2.0.3 age confidence

Release Notes

melbahja/goph (github.com/melbahja/goph)

v2.0.3

Compare Source

v2.0.2

Compare Source

v2.0.1: v2

Compare Source

Goph v2

Goph v2 brings Functional options API, context-aware commands, SOCKS5 proxy, jump hosts, lazy agent sockets, and many more features.

Breaking Changes
  • Removed goph.Auth type and goph.Config struct.

    • Replaced by functional options passed directly to goph.New.
  • Removed constructors: NewUnknown, NewConn.

    • Use goph.New(user, addr, opts...) with WithInsecureIgnoreHostKey() where needed.
  • Removed auth constructor functions: goph.Password(), goph.Key(), goph.UseAgent().

    • Replaced by WithPassword, WithKeyFile, WithDefaultAgent, WithAgentSocket etc.
  • Client.Config field removed.

    • *ssh.ClientConfig is now ephemeral: built in New, passed to options and dial helpers, then discarded. It is no longer stored on the connected Client.
  • Renamed key auth options:

    • WithKey(file, passphrase) => WithKeyFile(file, passphrase)
    • WithRawKey(pem, passphrase) => WithKey(pem, passphrase)
  • Renamed key parsing helpers:

    • GetSigner(file, passphrase) => ParseKeyFile(file, passphrase)
    • GetSignerForRawKey(key, passphrase) => ParseKey(key, passphrase)
New Features
  • Functional options API.

    • WithPassword, WithKeyFile, WithKey, WithAgent, WithAgentSocket, WithDefaultAgent, WithSigner, WithAuth
    • WithPort, WithTimeout, WithKnownHosts, WithInsecureIgnoreHostKey, WithHostKeyCallback, WithBannerCallback, WithConfig
    • WithProxy, WithJump
  • Dialer for reusable connections.

    • d := goph.NewDialer(opts...) then d.New(user, addr) for multiple hosts with shared defaults.
  • SOCKS5 proxy authentication.

    • WithProxy can accepts URLs with embedded credentials: socks5://user:pass@host:port.
  • Context-aware command cancellation.

    • RunContext and CommandContext accept context.Context.
    • Cancellation sends ssh.SIGINT to the remote session.
  • goph.Dial.

    • goph.Dial(c *Client, config *ssh.ClientConfig) error for manual Client construction and custom ssh.ClientConfig.
    • Client now stores User; Dial defaults config.User to Client.User or the current OS user when empty.
    • Direct TCP dials now respect config.Timeout.
  • Security fixes.

    • WithPassword no longer includes a keyboard-interactive fallback. Added standalone WithKeyboardInteractive(handler) that gives callers full control over each server prompt (password, OTP, 2FA, etc.).
    • Cmd.String warning now clearly states that Path and Args are not shell-escaped and that callers must sanitize untrusted input.
  • Known-hosts helpers.

    • KnownHosts now documents that the file must exist.
    • New EnsureKnownHosts creates the file (and parent directory) if missing.
    • DefaultKnownHosts uses EnsureKnownHosts so first-time users no longer hit a file-read error when ~/.ssh/known_hosts is absent.

Merge Request by @​melbahja in #​78
Full Changelog https://github.com/melbahja/goph/compare/v1.5.0...v2.0.1


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Mend Renovate CLI.

This MR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/melbahja/goph](https://github.com/melbahja/goph) | `v1.5.2` → `v2.0.3` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmelbahja%2fgoph/v2.0.3?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmelbahja%2fgoph/v1.5.2/v2.0.3?slim=true) | --- ### Release Notes <details> <summary>melbahja/goph (github.com/melbahja/goph)</summary> ### [`v2.0.3`](https://github.com/melbahja/goph/compare/v2.0.2...v2.0.3) [Compare Source](https://github.com/melbahja/goph/compare/v2.0.2...v2.0.3) ### [`v2.0.2`](https://github.com/melbahja/goph/compare/v2.0.1...v2.0.2) [Compare Source](https://github.com/melbahja/goph/compare/v2.0.1...v2.0.2) ### [`v2.0.1`](https://github.com/melbahja/goph/releases/tag/v2.0.1): v2 [Compare Source](https://github.com/melbahja/goph/compare/v1.5.2...v2.0.1) #### Goph v2 Goph v2 brings Functional options API, context-aware commands, SOCKS5 proxy, jump hosts, lazy agent sockets, and many more features. ##### Breaking Changes - **Removed `goph.Auth` type and `goph.Config` struct.** - Replaced by functional options passed directly to `goph.New`. - **Removed constructors:** `NewUnknown`, `NewConn`. - Use `goph.New(user, addr, opts...)` with `WithInsecureIgnoreHostKey()` where needed. - **Removed auth constructor functions:** `goph.Password()`, `goph.Key()`, `goph.UseAgent()`. - Replaced by `WithPassword`, `WithKeyFile`, `WithDefaultAgent`, `WithAgentSocket` etc. - **`Client.Config` field removed.** - `*ssh.ClientConfig` is now ephemeral: built in `New`, passed to options and dial helpers, then discarded. It is no longer stored on the connected `Client`. - **Renamed key auth options:** - `WithKey(file, passphrase)` => `WithKeyFile(file, passphrase)` - `WithRawKey(pem, passphrase)` => `WithKey(pem, passphrase)` - **Renamed key parsing helpers:** - `GetSigner(file, passphrase)` => `ParseKeyFile(file, passphrase)` - `GetSignerForRawKey(key, passphrase)` => `ParseKey(key, passphrase)` ##### New Features - **Functional options API.** - `WithPassword`, `WithKeyFile`, `WithKey`, `WithAgent`, `WithAgentSocket`, `WithDefaultAgent`, `WithSigner`, `WithAuth` - `WithPort`, `WithTimeout`, `WithKnownHosts`, `WithInsecureIgnoreHostKey`, `WithHostKeyCallback`, `WithBannerCallback`, `WithConfig` - `WithProxy`, `WithJump` - **`Dialer` for reusable connections.** - `d := goph.NewDialer(opts...)` then `d.New(user, addr)` for multiple hosts with shared defaults. - **SOCKS5 proxy authentication.** - `WithProxy` can accepts URLs with embedded credentials: `socks5://user:pass@host:port`. - **Context-aware command cancellation.** - `RunContext` and `CommandContext` accept `context.Context`. - Cancellation sends `ssh.SIGINT` to the remote session. - **`goph.Dial`.** - `goph.Dial(c *Client, config *ssh.ClientConfig) error` for manual `Client` construction and custom `ssh.ClientConfig`. - `Client` now stores `User`; `Dial` defaults `config.User` to `Client.User` or the current OS user when empty. - Direct TCP dials now respect `config.Timeout`. - **Security fixes.** - `WithPassword` no longer includes a keyboard-interactive fallback. Added standalone `WithKeyboardInteractive(handler)` that gives callers full control over each server prompt (password, OTP, 2FA, etc.). - `Cmd.String` warning now clearly states that `Path` and `Args` are not shell-escaped and that callers must sanitize untrusted input. - **Known-hosts helpers.** - `KnownHosts` now documents that the file must exist. - New `EnsureKnownHosts` creates the file (and parent directory) if missing. - `DefaultKnownHosts` uses `EnsureKnownHosts` so first-time users no longer hit a file-read error when `~/.ssh/known_hosts` is absent. **Merge Request** by [@&#8203;melbahja](https://github.com/melbahja) in [#&#8203;78](https://github.com/melbahja/goph/pull/78) **Full Changelog** <https://github.com/melbahja/goph/compare/v1.5.0...v2.0.1> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjYxLjMiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==-->
renovate_bot commented 2026-07-16 07:55:47 +00:00 (Migrated from jonasled.dev)

mentioned in issue #1

mentioned in issue #1
renovate_bot commented 2026-07-18 22:01:36 +00:00 (Migrated from jonasled.dev)

changed the description

changed the description
renovate_bot commented 2026-07-18 22:01:37 +00:00 (Migrated from jonasled.dev)

added 1 commit

  • 6f8bf8e2 - Update module github.com/melbahja/goph to v2

Compare with previous version

added 1 commit <ul><li>6f8bf8e2 - Update module github.com/melbahja/goph to v2</li></ul> [Compare with previous version](/jonasled/megacli-exporter/-/merge_requests/81/diffs?diff_id=66646&start_sha=1614e1bc4fb5a659d83f6a02d633c16681e9b04d)
renovate_bot commented 2026-07-21 07:08:23 +00:00 (Migrated from jonasled.dev)

added 3 commits

  • 6f8bf8e2...00fcd3d5 - 2 commits from branch master
  • 41877ee1 - Update module github.com/melbahja/goph to v2

Compare with previous version

added 3 commits <ul><li>6f8bf8e2...00fcd3d5 - 2 commits from branch <code>master</code></li><li>41877ee1 - Update module github.com/melbahja/goph to v2</li></ul> [Compare with previous version](/jonasled/megacli-exporter/-/merge_requests/81/diffs?diff_id=66974&start_sha=6f8bf8e256e6c8e9d582cfe2c0e33bee1bb6ec69)
renovate_bot commented 2026-08-12 11:33:19 +00:00 (Migrated from jonasled.dev)

changed the description

changed the description
renovate_bot commented 2026-09-15 22:02:21 +00:00 (Migrated from jonasled.dev)

changed the description

changed the description
renovate_bot commented 2026-09-15 22:02:24 +00:00 (Migrated from jonasled.dev)

added 17 commits

  • 41877ee1...f55a52d3 - 16 commits from branch master
  • 659bf8b9 - Update module github.com/melbahja/goph to v2

Compare with previous version

added 17 commits <ul><li>41877ee1...f55a52d3 - 16 commits from branch <code>master</code></li><li>659bf8b9 - Update module github.com/melbahja/goph to v2</li></ul> [Compare with previous version](/jonasled/megacli-exporter/-/merge_requests/81/diffs?diff_id=74664&start_sha=41877ee1353a68256c1fea5f8dbbb01369bfdd8b)
renovate_bot commented 2026-09-16 22:43:07 +00:00 (Migrated from jonasled.dev)

added 1 commit

  • 962ebdd5 - Update module github.com/melbahja/goph to v2

Compare with previous version

added 1 commit <ul><li>962ebdd5 - Update module github.com/melbahja/goph to v2</li></ul> [Compare with previous version](/jonasled/megacli-exporter/-/merge_requests/81/diffs?diff_id=74822&start_sha=659bf8b9629b5c0bcfe06f4179bdf2e9bdb1df74)
renovate_bot commented 2026-09-16 22:43:09 +00:00 (Migrated from jonasled.dev)

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this MR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this MR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -t ./...
go: downloading golang.org/x/crypto v0.55.0
go: downloading github.com/joho/godotenv v1.5.1
go: downloading github.com/sirupsen/logrus v1.10.1
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
go: downloading github.com/gin-gonic/gin v1.12.0
go: downloading github.com/prometheus/client_golang v1.24.1
go: downloading github.com/toorop/gin-logrus v0.0.0-20210225092905-2c785434f26f
go: downloading golang.org/x/sys v0.47.0
go: downloading github.com/gin-contrib/sse v1.1.0
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/quic-go/quic-go v0.59.0
go: downloading golang.org/x/net v0.57.0
go: downloading github.com/go-playground/validator/v10 v10.30.1
go: downloading github.com/goccy/go-yaml v1.19.2
go: downloading github.com/pelletier/go-toml/v2 v2.2.4
go: downloading github.com/ugorji/go/codec v1.3.1
go: downloading go.mongodb.org/mongo-driver/v2 v2.5.0
go: downloading google.golang.org/protobuf v1.36.11
go: downloading github.com/bytedance/sonic v1.15.0
go: downloading github.com/goccy/go-json v0.10.5
go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.6.2
go: downloading github.com/prometheus/common v0.70.1
go: downloading github.com/prometheus/procfs v0.21.1
go: downloading github.com/gabriel-vasile/mimetype v1.4.12
go: downloading github.com/go-playground/universal-translator v0.18.1
go: downloading github.com/leodido/go-urn v1.4.0
go: downloading golang.org/x/text v0.41.0
go: downloading github.com/quic-go/qpack v0.6.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
go: downloading github.com/bytedance/gopkg v0.1.3
go: downloading github.com/cloudwego/base64x v0.1.6
go: downloading golang.org/x/arch v0.22.0
go: downloading github.com/go-playground/locales v0.14.1
go: downloading github.com/klauspost/cpuid/v2 v2.3.0
go: downloading github.com/bytedance/sonic/loader v0.5.0
go: downloading github.com/twitchyliquid64/golang-asm v0.15.1
go: downloading github.com/melbahja/goph v1.5.2
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/pkg/sftp v1.13.11
go: downloading github.com/kr/fs v0.1.0
go: jonasled.dev/jonasled/megacli-exporter/metrics imports
	github.com/gin-gonic/gin imports
	github.com/gin-gonic/gin/binding imports
	github.com/go-playground/validator/v10 imports
	golang.org/x/text/language: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer
go: jonasled.dev/jonasled/megacli-exporter/metrics imports
	github.com/gin-gonic/gin imports
	github.com/quic-go/quic-go/http3 imports
	golang.org/x/net/idna imports
	golang.org/x/text/secure/bidirule: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer
go: jonasled.dev/jonasled/megacli-exporter/metrics imports
	github.com/gin-gonic/gin imports
	github.com/quic-go/quic-go/http3 imports
	golang.org/x/net/idna imports
	golang.org/x/text/unicode/bidi: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer
go: jonasled.dev/jonasled/megacli-exporter/metrics imports
	github.com/gin-gonic/gin imports
	github.com/quic-go/quic-go/http3 imports
	golang.org/x/net/idna imports
	golang.org/x/text/unicode/norm: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer
go: jonasled.dev/jonasled/megacli-exporter/metrics imports
	github.com/gin-gonic/gin imports
	github.com/gin-gonic/gin/binding imports
	github.com/go-playground/validator/v10 imports
	github.com/go-playground/universal-translator imports
	github.com/go-playground/locales: github.com/go-playground/locales@v0.14.1: Get "https://proxy.golang.org/github.com/go-playground/locales/@v/v0.14.1.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer

### ⚠️ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this MR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this MR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: go.sum ``` Command failed: go get -t ./... go: downloading golang.org/x/crypto v0.55.0 go: downloading github.com/joho/godotenv v1.5.1 go: downloading github.com/sirupsen/logrus v1.10.1 go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1 go: downloading github.com/gin-gonic/gin v1.12.0 go: downloading github.com/prometheus/client_golang v1.24.1 go: downloading github.com/toorop/gin-logrus v0.0.0-20210225092905-2c785434f26f go: downloading golang.org/x/sys v0.47.0 go: downloading github.com/gin-contrib/sse v1.1.0 go: downloading github.com/mattn/go-isatty v0.0.20 go: downloading github.com/quic-go/quic-go v0.59.0 go: downloading golang.org/x/net v0.57.0 go: downloading github.com/go-playground/validator/v10 v10.30.1 go: downloading github.com/goccy/go-yaml v1.19.2 go: downloading github.com/pelletier/go-toml/v2 v2.2.4 go: downloading github.com/ugorji/go/codec v1.3.1 go: downloading go.mongodb.org/mongo-driver/v2 v2.5.0 go: downloading google.golang.org/protobuf v1.36.11 go: downloading github.com/bytedance/sonic v1.15.0 go: downloading github.com/goccy/go-json v0.10.5 go: downloading github.com/json-iterator/go v1.1.12 go: downloading github.com/beorn7/perks v1.0.1 go: downloading github.com/cespare/xxhash/v2 v2.3.0 go: downloading github.com/prometheus/client_model v0.6.2 go: downloading github.com/prometheus/common v0.70.1 go: downloading github.com/prometheus/procfs v0.21.1 go: downloading github.com/gabriel-vasile/mimetype v1.4.12 go: downloading github.com/go-playground/universal-translator v0.18.1 go: downloading github.com/leodido/go-urn v1.4.0 go: downloading golang.org/x/text v0.41.0 go: downloading github.com/quic-go/qpack v0.6.0 go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd go: downloading github.com/modern-go/reflect2 v1.0.2 go: downloading github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 go: downloading github.com/bytedance/gopkg v0.1.3 go: downloading github.com/cloudwego/base64x v0.1.6 go: downloading golang.org/x/arch v0.22.0 go: downloading github.com/go-playground/locales v0.14.1 go: downloading github.com/klauspost/cpuid/v2 v2.3.0 go: downloading github.com/bytedance/sonic/loader v0.5.0 go: downloading github.com/twitchyliquid64/golang-asm v0.15.1 go: downloading github.com/melbahja/goph v1.5.2 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/pkg/sftp v1.13.11 go: downloading github.com/kr/fs v0.1.0 go: jonasled.dev/jonasled/megacli-exporter/metrics imports github.com/gin-gonic/gin imports github.com/gin-gonic/gin/binding imports github.com/go-playground/validator/v10 imports golang.org/x/text/language: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer go: jonasled.dev/jonasled/megacli-exporter/metrics imports github.com/gin-gonic/gin imports github.com/quic-go/quic-go/http3 imports golang.org/x/net/idna imports golang.org/x/text/secure/bidirule: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer go: jonasled.dev/jonasled/megacli-exporter/metrics imports github.com/gin-gonic/gin imports github.com/quic-go/quic-go/http3 imports golang.org/x/net/idna imports golang.org/x/text/unicode/bidi: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer go: jonasled.dev/jonasled/megacli-exporter/metrics imports github.com/gin-gonic/gin imports github.com/quic-go/quic-go/http3 imports golang.org/x/net/idna imports golang.org/x/text/unicode/norm: golang.org/x/text@v0.41.0: read "https://proxy.golang.org/golang.org/x/text/@v/v0.41.0.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer go: jonasled.dev/jonasled/megacli-exporter/metrics imports github.com/gin-gonic/gin imports github.com/gin-gonic/gin/binding imports github.com/go-playground/validator/v10 imports github.com/go-playground/universal-translator imports github.com/go-playground/locales: github.com/go-playground/locales@v0.14.1: Get "https://proxy.golang.org/github.com/go-playground/locales/@v/v0.14.1.zip": read tcp [2a0e:97c0:b50:2b:a29c:2a64:f396:48b4]:41262->[2a00:1450:400c:c0a::8d]:443: read: connection reset by peer ```
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jonasled/megacli-exporter!82
No description provided.