aws/session-manager-plugin

Issues with LINES/COLUMNS/keyboard usage

askmike1 opened this issue · 3 comments

When using the AWS session manager on windows I'm noticing a few issues:

  • If I open any sort of text editor or just type a command, it is limiting to 80 columns, 24 lines, rather than use the window size (same can be confirmed when echoing $COLUMNS or $LINES (ssh works fine)
  • If I open any sort of text editor, the home/end keys no longer work (ssh works fine)

Seems to be happening on both linux & windows

Hi askmike1@, thank you for reaching out! Session Manager on Windows platform is done via WinPty. As is pointed out on the WinPty github post, terminal resizing message is not always processed properly. Our service team has received your request about this. We will follow up to evaluate if we could get support from WinPty or mitigate this from our end.

As for the issue with Linux, can you share more details? What is your platform OS and version, shell version, etc?

Cheers,
Yuting

This issues appears to be fairly consistent across all platforms as others on my team have the same issue. The terminal goes back to being fine if you change the size of the window after opening the ssm session, but until you do that it defaults to 80x24. The linux platform I tested on was RHEL7, bash.

Someone else on my team noted that it is running bash as a batch shell, not a login shell.

The size of 80x24 is likely the default terminal size a Windows machine configures. The default terminal size that Session Manager configures for a Windows target is 200 x 60 currently. You can verify what terminal size is sent from client side by enabling the debug-level logs in your SSM Session Manager plugin logs. This is the documentation for how to tune and view the Session Manager plugin logs.

Regarding your issue with home/end keys, I do not have a RHEL7 machine, but verified with a RHEL8 host using bash, the home/end keyboards work without issues.

I would recommend you to open an AWS support case if you continue to see issues. We can take a closer look of your issue and provide further assistance.

Cheers,
Yuting