Skip to content
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

BUG: CTRL-D in an SSM session exits the session abruptly #28

Closed
AndrewFarley opened this issue Dec 27, 2021 · 4 comments
Closed

BUG: CTRL-D in an SSM session exits the session abruptly #28

AndrewFarley opened this issue Dec 27, 2021 · 4 comments

Comments

@AndrewFarley
Copy link

AndrewFarley commented Dec 27, 2021

I don't know if this is a feature or a bug... but I regularly use the joe text editor and CTRL-D is one of the standard shortcuts which when used in an SSM SSH session it instantly disconnects with an error...

Cannot perform start session: read /dev/stdin: resource temporarily unavailable

On a fresh SSH connection, when I CTRL-D it exits...

Starting session with SessionId: username-0ed94becce0968820
$    <-  HERE I HIT CTRL-D

Exiting session with sessionId: username-0ed94becce0968820.

I assume/hope this is not a feature or some internal SSM hook to disconnect or something, but incase it is, is there a way to rebind it perhaps to another keystroke? I assume I'm not the only person to hit this issue, as more people transition off of using SSH and onto SSM, imho having an fully-compatible ssh-like tunnel is critical. And having special key combinations that are "caught" by the ssm engine feels like a potential incompatibility with software run in the remote console that may use this hook.

@justinmk3
Copy link

justinmk3 commented Dec 28, 2021

Does this happen when running joe in a local terminal session? Typically, a text editor will set the terminal to raw mode , so that it can intercept standard control codes like ctrl-d. But it seems like that isn't happening here.

https://en.wikipedia.org/wiki/End-of-Transmission_character#Meaning_in_Unix

In any case this is not specific to SSM, which just sets up the layer over which SSH connects.

@AndrewFarley
Copy link
Author

@justinmk3 Great point... I just checked, and when in an SSH session with nothing open, CTRL-D does exit the session so I assume that is proper functionality on SSM. So, perhaps this bug is not related to SSM.

Incase anyone lands here though, when in an joe editor using os-x iTerm CTRL-D will exit the SSM session. And on both iTerm and on Terminal while in a joe session, CTRL-Y will randomly/selectively exit the entire session which it should never do. There may be adjustments that can be made in iTerm and/or Terminal and/or my key bindings that could fix it. If you don't believe this is an SSM issue, please close this issue however.

@justinmk3
Copy link

justinmk3 commented Dec 29, 2021

The root cause of the joe + CTRL-D behavior is the same as #29 so I suggest we close this , and rename #29 to something like SSM claims TERM=xterm-256color but behaves like TERM=ansi.

Starting session with SessionId: username-0ed94becce0968820
$    <-  HERE I HIT CTRL-D

Exiting session with sessionId: username

That at least is a standard behavior of shells. But the joe behavior is still strange.

@AndrewFarley
Copy link
Author

Agreed.

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

No branches or pull requests

2 participants