From 4f778f696e6fd3ea676a0f50e46b14fb655094a4 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Fri, 11 Mar 2016 14:58:27 -0800 Subject: [PATCH] joyent/node-triton#52 Fix interactive 'triton ssh ' sessions; add workaround for #52 --- CHANGES.md | 15 +++++++++ lib/do_instance/do_ssh.js | 71 +++++++++++++++++++++++++++++---------- lib/do_ssh.js | 1 + 3 files changed, 70 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5506504..4528e99 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,25 @@ # node-triton changelog +Known issues: + +- `triton ssh ...` disables ssh ControlMaster to avoid issue #52. + + ## 4.7.1 (not yet released) +- #52 Workaround for `triton ssh ...`. In version 4.6.0, `triton ssh ...` + interactive sessions were broken. This version reverts that change and adds + a workaround for #52 (by disabling ControlMaster when spawning `ssh`). + See for details. - #97 `triton profile set -` to set the *last* profile as current. - PUBAPI-1266 Added `instance enable-firewall` and `instance disable-firewall` ## 4.7.0 +**Known issue: `triton ssh` interactive sessions are broken. +Upgrade to v4.7.1.** + - #101 Bash completion for server-side data: instances, images, etc. Bash completion on TAB should now work for things like the following: `triton create [arguments]\n' - + '\n' - + '{{options}}' -); +do_ssh.help = [ + /* BEGIN JSSTYLED */ + 'SSH to the primary IP of an instance', + '', + 'Usage:', + ' {{name}} ssh [-h] [-M] []', + '', + '{{options}}', + 'Where is the name, short ID or ID of a given instance. Note that', + 'the argument must come before any `ssh` options or arguments.', + '', + 'There is a known issue with SSH connection multiplexing (a.k.a. ', + 'ControlMaster, mux) where stdout/stderr is lost. As a workaround, `ssh`', + 'is spawned with options disabling ControlMaster. You may use the `-M`', + 'option to not disable ControlMaster but, with node >=0.12, you will lose', + 'stdout/stderr output. See ', + 'for details.' + /* END JSSTYLED */ +].join('\n'); do_ssh.interspersedOptions = false; diff --git a/lib/do_ssh.js b/lib/do_ssh.js index 14df1ca..8cf725d 100644 --- a/lib/do_ssh.js +++ b/lib/do_ssh.js @@ -21,6 +21,7 @@ function do_ssh(subcmd, opts, args, callback) { } do_ssh.help = 'A shortcut for "triton instance ssh".'; +do_ssh.interspersedOptions = targ.interspersedOptions; do_ssh.options = targ.options; do_ssh.completionArgtypes = targ.completionArgtypes;