EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SSH VB6 sends extra enter?

Posted: 09/10/2008 13:38:38
by Greg Morphis (Basic support level)
Joined: 09/10/2008
Posts: 9

My first post.. I'm trying to upgrade a VB app I wrote 6 years ago to SSH from Telnet I am trying to use the Secure Black Box Active X control for my app.
I can connect to the system but when I enter a command it sends me back a menu. Hitting Enter normally does this.. but I'm not sending an extra enter..

Call Client.SendText(Edit5.Text + Chr(13) + Chr(10))
Edit5.Text = ""

Just like in the demo. I've tried vbCrLF but that does the same thing, in less code. I know this is what's happening because the textbox.. if you scroll up you can see the sub menu in the textbox control and then immediately there after the main menu again.
Any ideas I can try, I need to get this working sooner than later.

Posted: 09/10/2008 23:29:41
by Eugene Mayevski (Team)

Greg Morphis wrote:
Chr(13) + Chr(10)

this is Enter.

Sincerely yours
Eugene Mayevski
Posted: 09/11/2008 09:37:23
by Greg Morphis (Basic support level)
Joined: 09/10/2008
Posts: 9

I know that's enter, but that's not my problem.
You have to hit enter once to send the command to the server (which is what the first "enter" does). It's appraently sending "enter" once again afterwards.

Here's the scenario, I log into the server.
Am I'm given a menu of states to choose from.
If I log in via putty, and type in manually "AR" and (enter). I'm taken to the Arkansas menu. If I hit (enter) again, I'm taken back 1 level, to the main menu.

When I use the SSHDemo and log into the same server, I type "AR" in the textbox and push the send button, I see the main menu, if I scroll up in the text I see where it did send the "AR" and did go to the Arkansas menu but apparently sent another enter to go back..

Posted: 09/11/2008 09:45:23
by Eugene Mayevski (Team)

The component doesn't send any extra characters other than the data passed to SendData (or SendText) method. However it can be that the server treats Chr(13) and Chr(10) as two enters. You can comment out one of characters and see which one is not needed with your server.

Sincerely yours
Eugene Mayevski
Posted: 09/11/2008 11:01:18
by Greg Morphis (Basic support level)
Joined: 09/10/2008
Posts: 9

I'll try that.
In the telnet version I'd use
Telnet1.Send "DISP CP MOBDEN " & Mid$(mobile, 8, 3) & vbCrLf

something like that..
I'll let you know.. thanks



Topic viewed 1392 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!