Telnet SessionLog Problem

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Telnet SessionLog Problem

Post by asawyer13 » Thu Apr 09, 2009 2:01 am

I am trying to do my first telnet session.

I am having trouble in getting it to work so I tried to see the session log by doing:

Code: Select all

MessageModal>TELNET_SESSIONLOG
but the Message box just shows TELNET_SESSIONLOG (the actual text)

I am using V11 Pro.

This is my code, I have replaced passwords, etc with xxxx

Code: Select all

TelnetConnect>www.mydomain.com,23,hTN

TelnetWaitFor>hTN,login,8,r
TelnetSend>hTN,yuser%CR%
TelnetWaitFor>hTN,password,5,r
TelnetSend>hTN,xxxx%CR%
TelnetWaitFor>hTN,>,5,r
TelnetSend>hTN,cd sql%CR%
TelnetWaitFor>hTN,$,5,r
TelnetSend>hTN,mysql --database=asbo -u xxxn --password=xxxx --show-warnings <error>>temp.lis
TelnetWaitFor>hTN,$,600,r
TelnetSend>hTN,mysql --database=asbo -u xxxn --password=xxxx --show-warnings <output>>temp.lis
TelnetWaitFor>hTN,$,600,r

MessageModal>TELNET_SESSIONLOG
TelnetClose>hTN

Any help would be appreciated.
Alan

asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Post by asawyer13 » Thu Apr 09, 2009 2:05 am

Something I just noticed that seems a little weird.
The actual mysql statements that I'm sending is:

mysql --database=asbo -u xxxn --password=xxxx --show-warnings >temp.lis

But when I wrap it in code it changes the

I'm assuming the forum is doing this, and that the program wouldn't have a problem, but I wanted to let you know.

This doesn't explain why the session log isn't being displayed either.

Alan

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Apr 09, 2009 4:12 am

'm assuming the forum is doing this,
At the bottom of your posting screen disable HTML. You may actually want to change that in your Profile for the forum.

No chance yet to look ar your real problem.......
[/quote]
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Post by asawyer13 » Thu Apr 09, 2009 12:11 pm

I understand the html setting, and that is now corrected, but I'm still trying to understand why the MessageModal>TELNET_SESSIONLOG isn't working.

Is anyone else having this issue?

I downloaded the newest version of MS yesterday, so I'm sure I'm using the most current, or at least the most current as of yesterday.

Alan

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Try it this way.

Post by gdyvig » Thu Apr 09, 2009 1:22 pm

MessageModal>%TELNET_SESSIONLOG%

That is how the user guide showed using a similar system variable for SMTP.

Gale

asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Post by asawyer13 » Thu Apr 09, 2009 1:34 pm

I had tried that also, but it didn't work, but tonight I will try again to confirm that.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Apr 09, 2009 1:44 pm

If you are only seeing "TELNET_SESSIONLOG" then it cannot have logged in. The variable is only filled once the login is successful. It then gets appended with the output of the session.

So if you are seeing "TELNET_SESSIONLOG" the variable hasn't yet been created/set, so the login must have failed.

Using the debugger look at the value of hTN and r. If there was no initial connect then hTN would be zero. If it connected but the login failed I would expect the rest of the commands to timeout so r will at some point be set to TIMEOUT.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Apr 09, 2009 2:01 pm

I've never used this command so was just testing it. From my results, I was going to say pretty much what Marcus just told you. If you have the TelnetConnect> line incorrect the variable "TELNET_SESSIONLOG" does not get set to anything.

Try using the server's IP address in the TelnetConnect> line

asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Post by asawyer13 » Thu Apr 09, 2009 2:21 pm

I will try these suggestions tonight and let you know.
Thanks for your help.
Alan

asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Post by asawyer13 » Thu Apr 09, 2009 5:27 pm

I think I may have confused myself.
I'm wanting to login to my Linux server remotely, and I think I really need SSH and not Telnet.
Is there a way to use SSH with MS?
Alan

asawyer13
Newbie
Posts: 19
Joined: Wed Aug 20, 2008 12:31 pm

Post by asawyer13 » Thu Apr 09, 2009 5:32 pm

I found the Blog entry on SSH, so I am going to give that a try.
Sorry for the confusion.
Alan

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts