diff --git a/app.go b/app.go index eabc3b5..63c7d51 100644 --- a/app.go +++ b/app.go @@ -340,12 +340,16 @@ func (a *App) runSaveRemotePipeline(pngBytes []byte) error { "auth_method", cfg.SSH.AuthMethod, "png_size", len(pngBytes)) // Select the uploader by auth method: Kerberos delegates to the system - // ssh/scp binaries (reusing the kinit credential cache), while builtin - // uses the in-process Go SSH client. + // ssh/scp binaries (reusing the kinit credential cache), bgo delegates to + // the internal `bgo scp` client (under a PTY), while builtin uses the + // in-process Go SSH client. var uploader application.SSHUploader - if cfg.SSH.IsKerberos() { + switch { + case cfg.SSH.IsKerberos(): uploader = sshpkg.NewKerberosUploader(cfg.SSH) - } else { + case cfg.SSH.IsBgo(): + uploader = sshpkg.NewBgoUploader(cfg.SSH) + default: uploader = sshpkg.NewUploader(cfg.SSH) } @@ -467,6 +471,15 @@ func (a *App) TestSSHConnection(cfg domain.SSHConfig) error { } return nil } + // bgo manages its own auth; we can only confirm the binary is installed + // and resolvable (a real transfer would need a live remote + PTY). + if cfg.IsBgo() { + if err := sshpkg.TestBgoConnection(a.ctx, cfg); err != nil { + slog.Error("RPC TestSSHConnection (bgo) failed", "err", err) + return err + } + return nil + } if err := sshpkg.TestConnection(a.ctx, cfg); err != nil { slog.Error("RPC TestSSHConnection failed", "err", err) return err diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index 4bcd2ca..a214b56 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -289,6 +289,7 @@ onMounted(load) +