Skip to content

feat(cli): implement ssh remote forward #8515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 20, 2023
Prev Previous commit
Next Next commit
TODOs
  • Loading branch information
mtojek committed Jul 14, 2023
commit a532f7bd9a4f218727d6f5108e15469b5f99595d
4 changes: 4 additions & 0 deletions cli/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ func (r *RootCmd) ssh() *clibase.Cmd {
client.SetLogger(logger)
}

// TODO Validate -R and --stdio

workspace, workspaceAgent, err := getWorkspaceAndAgent(ctx, inv, client, codersdk.Me, inv.Args[0])
if err != nil {
return err
Expand Down Expand Up @@ -301,6 +303,8 @@ func (r *RootCmd) ssh() *clibase.Cmd {
defer closer.Close()
}

// TODO if sshForwardRemote

stdoutFile, validOut := inv.Stdout.(*os.File)
stdinFile, validIn := inv.Stdin.(*os.File)
if validOut && validIn && isatty.IsTerminal(stdoutFile.Fd()) {
Expand Down