How to Resize SSHShell (Terminal)?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
sllimr7139
Posts: 6
Joined: Thu 22 Dec 2011 16:38

How to Resize SSHShell (Terminal)?

Post by sllimr7139 » Thu 22 Dec 2011 17:32

I haven't been able to get this to work yet.

I'm in the process of writing a SSH Terminal client (a-la putty) and while I have almost everything that I want to work already done, I can't get the terminal to recognize any of the re-size commands to be recognized.

I have found the TSsh2Channel.SendWindowAdjust method, but I can't figure out how to actually get access to it.

TScSSHShell descends from TScSSHCustomChannel, but TSSH2Channel does not descend from TScSSHCustomChannel at all. It is derived from TSSHChannel which is, as far as I can tell, a stand alone class.

How do I get access to SendWindowAdjust?

Thanks,

Ryan.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 30 Dec 2011 09:11

To set information about the terminal, which is created on the server side for correct displaying results via TScSSHShell, you should use the TScSSHShell.TerminalInfo property. You can find more detailed information about this property in the SecureBridge help.
The TSSH2Channel class and the SendWindowAdjust method are internal and you shouldn't use them yourself.

sllimr7139
Posts: 6
Joined: Thu 22 Dec 2011 16:38

Post by sllimr7139 » Sat 31 Dec 2011 01:21

If the connection is first being made, then the TScSSHShell.TerminalInfo settings are correctly being used. But how do I get the Terminal session, on the server, to recognize the fact that I've expanded, or shrunk, the number of rows or columns?

I have tried sending ANSI terminal commands with no avail. Next I thought it might be something in the connection components I could adjust, since it does get set on login.

I know it can be done, since Putty can do it, I just don't know how it does it.

Ah well. If someone else has a notion of something I can try please let me know.

Thanks.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 04 Jan 2012 14:52

Now SecureBridge does not support such functionality. We are planning to add its support in one of the next SecureBridge builds.

sllimr7139
Posts: 6
Joined: Thu 22 Dec 2011 16:38

Post by sllimr7139 » Wed 04 Jan 2012 15:56

Thanks. I look forward to seeing that.

sllimr7139
Posts: 6
Joined: Thu 22 Dec 2011 16:38

Post by sllimr7139 » Sun 15 Jan 2012 15:36

Dimon wrote:Now SecureBridge does not support such functionality. We are planning to add its support in one of the next SecureBridge builds.
While waiting for the official support from the developers I have added the necessary code to make it work for me in the mean time. Thanks again for the components, they work very well.

Post Reply