I have Linux mint 18, the remote machine have Ubuntu 16.04. When I setup remote session via ssh sometimes it is broken:

enter image description here

As you can see it is restricted by 80x40, but I expect it should take full screen

enter image description here

Sometimes it takes full window, sometimes not.

How to fix that? it should take whole window always.


I miss major information. I ssh on host then I enter into container:

`kubectl --namespace=$NAMESPACE exec -ti `kubectl --namespace=$NAMESPACE get pods | grep $NAME | cut -f 1 -d ' '` bash`


$ gnome-terminal --version
GNOME Terminal 3.18.3

A terminal emulator for the GNOME desktop Using VTE version 0.42.5 +GNUTLS


stty size
0 0
  • 1
    This probably has to do with the environment variable TERM, and with the corresponding terncap / terminfo entry. What is different wen you run into the problem? – Satō Katsura May 22 '17 at 7:41
  • @SatoKatsura, probably you mean termcap/terminfo (terMcap) – Romeo Ninov May 22 '17 at 7:44
  • 1
    @RomeoNinov I'm notoriously bad at typing. shrug – Satō Katsura May 22 '17 at 7:48
  • @SatoKatsura: I do not know. I save output from ENV and compare them when this problem occur. I will update question with that info. Thanks – Eugen Konkov May 22 '17 at 8:11
  • 1
    What terminal emulator are you using? Does stty size print the correct size before and after running ssh? – Gilles May 22 '17 at 23:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.