<div dir="ltr"><br><div style>Trying to understand the relationship between resizing a terminal, stty, and how the remote side gets that information that the window has been resized.</div><div style><br></div><div style>The issue is that I can ssh into a linux host with no issues, resize my window all day long and the remote side sees the resize (confirmed by stty -a | grep row).</div>
<div style><br></div><div style>However, we have a very small expect wrapper that we use most of the time to log in.  The expect wrapper goes to a credential store to fetch the password (yeah, I know, public keys, etc ... that&#39;s a long story), and passes the password to the prompt.</div>
<div style><br></div><div style>When I use the expect wrapper to log in, the remote side never sees the resize.  I can manually set the window size using stty, but I&#39;m unclear on why wrapping it in expect is causing this issue.  The terminal type is the same in both cases, and I&#39;ve confirmed this behavior in two different terminal applications (Terminal.app and iTerm2).</div>
<div style><br></div><div style>How does the remote side know about the resize?  Is it some kind of backchannel communication, or is there some kind of escape code getting sent?</div><div style><br></div><div style>This is the essence of the expect script, if it helps put it in context:</div>
<div style><br></div><div style>---</div><div style><div>spawn -noecho ssh -o PubKeyAuthentication=no -o StrictHostKeyChecking=no root@$host $cmd</div><div><br></div><div>expect &quot;?*password?*&quot;</div><div>send &quot;$passwd\r&quot;</div>
<div><br></div><div>interact</div><div><br></div><div>exit 0</div><div>---</div><div><br></div><div style>(yes -- first rule -- never, ever log in as root -- if I could get my giant company with our 10s of thousands of servers to understand that life would be much easier.)</div>
<div style><br></div><div style>the $cmd part is ignored if it wasn&#39;t provided.</div><div style><br></div><div style>termtype all that behind the scenes stuff re a terminal is a topic I admittedly don&#39;t understand very well.</div>
<div style><br></div><div style>thanks</div><div style>-rick</div></div></div>