Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Telnet question

 
Goto page 1, 2
   Database Help (Home) -> Paradox RSS
Next:  performance question  
Author Message
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 1) Posted: Tue Feb 08, 2005 3:36 pm
Post subject: Telnet question
Archived from groups: comp>databases>paradox (more info?)

I would like to control a telnet sesssion,
from within paradox.

I need to login to a unix server,
by supplying username and password,
then run a script file that exists on the unix hard drive.

The script file will take several minutes to complete.

My preference would be to issue a command
and have the command execution return a value
that lets me know whether the script executed or not.

Alternatively,
I already have some nice ftp tools at my disposal,
( thanks to rick kelly / crooit)
and knowing when the job was done,
can easily be checked for by looking for the existence
of a certain file on the unix system.

Has anyone done this ?
Am I missing something easy ?
Any pointers in the right direction ?

Can I maybe call windows telnet with a file or parameters
and have it log in, run command, and then log out ?


Thanks in advance
Robert Wiltshire

 >> Stay informed about: Telnet question 
Back to top
Login to vote
Larry DiGiovanni2

External


Since: Jul 22, 2004
Posts: 36



(Msg. 2) Posted: Tue Feb 08, 2005 3:40 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

A scripted telnet session sounds ponderous. For 1, unless this is over an
internal LAN only, you want to use ssh, not telnet.

I'd drive this from the unix side if possible. Have you thought of using
a webserver and cgi-bin to execute your shell script, then pull the coded
output? I think Tony or Rick have an http component.

Using the same approach, set up a scheduled job on the unix box to
periodically check for the existence of a file and execute your process,
writing a logfile, when it was found.

For that matter, if your could mount a directory on the unix box via
samba, you could handle the whole thing through textstreams.

Just some ideas, which I realize may not be workable. I tried getting a
password into ssh a while back and found that it expects to get it from
the console only and won't take redirection.

--
Larry DiGiovanni
Digico, Inc
IT Consulting and Staffing Solutions
www.digicoinc.com
Check out www.thedbcommunity.com for Paradox resources

 >> Stay informed about: Telnet question 
Back to top
Login to vote
Rodney Wise2

External


Since: Mar 31, 2004
Posts: 13



(Msg. 3) Posted: Tue Feb 08, 2005 4:14 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Off the top of my head, I'd say try this:

1. Find a Windows based command level TelNet
Terminal Application. (I'm sure they exist.)

2. Open it minimized from within Paradox and include
command line parameters that would log you onto
the UNIX machine and fire up the script.

3. Close the TelNet Terminal.

4. Fire up Rick's FTP stuff from Paradox and check
for the file (via a timer that would time out after a
reasonable period if the file isn't found).


--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Larry DiGiovanni2

External


Since: Jul 22, 2004
Posts: 36



(Msg. 4) Posted: Tue Feb 08, 2005 4:26 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Following down the http path, you could use something like lynx or wget to
handle the http side, and fire those off of the command line.

--
Larry DiGiovanni
Digico, Inc
IT Consulting and Staffing Solutions
www.digicoinc.com
Check out www.thedbcommunity.com for Paradox resources
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 5) Posted: Tue Feb 08, 2005 4:39 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > A scripted telnet session sounds ponderous. For 1, unless this is over an
 > internal LAN only, you want to use ssh, not telnet.
Yes, definintely over an internal lan.

 > I'd drive this from the unix side if possible. Have you thought of using
 > a webserver and cgi-bin to execute your shell script, then pull the coded
 > output? I think Tony or Rick have an http component.
I am an owner of both of their components (both good).
There is no web server on this unix machine.
It is an IBM machine running aix and db2.

Currently, I manually log in using telnet,
cd to proper folder on unix system,
then type in name of shell script to run,
and then wait as it "executes".

The script runs a series of sql that I created against a db2 database
server,
( which creates 15 text files on unix hard disk )
and when it finishes I am at a unix prompt.
I manually log out and go to my pdox application.

I then ftp the files from pdox using crooit ftp,
and ftp them to a windows network folder.

After ftp is done,
I log back into the unix system,
and manually delete the text files.

Not a huge pain,
but a process that could be streamlined,
and I am more than willing to spend some money
on a working telnet solution.


 > Using the same approach, set up a scheduled job on the unix box to
 > periodically check for the existence of a file and execute your process,
 > writing a logfile, when it was found.
Nope.
I can log into the unix box,
but I need to kick off the process upon demand,
and I would like to use pdox to kick it off.


 > For that matter, if your could mount a directory on the unix box via
 > samba, you could handle the whole thing through textstreams.
Not my unix box, it is at a customer site.

 > Just some ideas, which I realize may not be workable. I tried getting a
 > password into ssh a while back and found that it expects to get it from
 > the console only and won't take redirection.
Ok, thanks. Comments appreciated.



Robert Wiltshire<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Larry DiGiovanni2

External


Since: Jul 22, 2004
Posts: 36



(Msg. 6) Posted: Tue Feb 08, 2005 4:40 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Can you:

1. Access the DB2 server from Paradox?

or

2. Access the DB2 server from a command-line utility on your workstation?

If so, I would drive this from DB2. Either by fetching the data directly
over ODBC, or by executing a stored procedure that wrote the desired
output to a directory on the AIX box that I could ftp from after the
stored procedure was finished executing.

 > I can log into the unix box,
 > but I need to kick off the process upon demand,
 > and I would like to use pdox to kick it off.

The idea of monitoring for a file that you deliver was intended to provide
on-demand execution. You'd write a daemon process that was monitoring for
this file, perhaps every few seconds, and on finding it, would fire off
your process. You'd invoke it by ftping the "flag" file.

One reason to stay away from telnet on a box you don't own is that it
might just be a matter of time before the sysadmin shuts off telnet and
only allows ssh access to it. I don't know anyone who is still using
telnet.

--
Larry DiGiovanni
Digico, Inc
IT Consulting and Staffing Solutions
<a style='text-decoration: underline;' href="http://www.digicoinc.com" target="_blank">www.digicoinc.com</a>
Check out <a style='text-decoration: underline;' href="http://www.thedbcommunity.com" target="_blank">www.thedbcommunity.com</a> for Paradox resources<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Jonathan Wright

External


Since: Feb 08, 2005
Posts: 1



(Msg. 7) Posted: Tue Feb 08, 2005 6:40 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rather than use telnet, if you already have a Unix script to execute on the
AIX box, why not look at using rsh. I believe this will work if your Windows
client is Windows 2000 or Win XP.

Your only concern will be how to grant/enable access only to this workstation.
About 4 years ago I'd be able to tell you this in a shot, but have clean
forgotten this part of Unix security.

If you want to continue with checking files or uploading new ones then you
can do this via FTP, NFS or Samba.

This will give you on-demand processing, otherwise I would say your best
bet is a cron job running each minute and when a specified file exists it
runs your script, removes the file and when complete places a new/completed
file in the same location for you to check.


Regds
Jonathan
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 8) Posted: Tue Feb 08, 2005 9:47 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Rather than use telnet, if you already have a Unix script to execute on
the
 > AIX box, why not look at using rsh. I believe this will work if your
Windows
 > client is Windows 2000 or Win XP.

 > Your only concern will be how to grant/enable access only to this
workstation.
 > About 4 years ago I'd be able to tell you this in a shot, but have clean
 > forgotten this part of Unix security.

I have telnet privileges to log in manually,
but I do believe that rsh requires additional config on the unix system.
So while I dont think that is an option for this particular task,
I research it a little further.

 > If you want to continue with checking files or uploading new ones then you
 > can do this via FTP, NFS or Samba.
Correct, I have some nice ftp stuff, and have no problem checking for
created files.

 > This will give you on-demand processing, otherwise I would say your best
 > bet is a cron job running each minute and when a specified file exists it
 > runs your script, removes the file and when complete places a
new/completed
 > file in the same location for you to check.

That would require additional configuration on server,
which is not going to happen at this client site.

Thank you
Robert Wiltshire<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 9) Posted: Tue Feb 08, 2005 10:07 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rodney wrote :
 > 1. Find a Windows based command level TelNet
 > Terminal Application. (I'm sure they exist.)

 > 2. Open it minimized from within Paradox and include
 > command line parameters that would log you onto
 > the UNIX machine and fire up the script.

Yes, this is *exactly* what I want to try.

While doing some research and digging today
with my two good buddies,
(ogling with google and some other yahoo)
I stumbled acoss these :
1 . putty/plink,
<a style='text-decoration: underline;' href="http://www.puttyssh.org/" target="_blank">http://www.puttyssh.org/</a>
2. power tcp telnet tool, an active X component
<a style='text-decoration: underline;' href="http://www.dart.com/powertcp/telnet.asp" target="_blank">http://www.dart.com/powertcp/telnet.asp</a>
3. catalyst dll
<a style='text-decoration: underline;' href="http://www.catalyst.com/products/sockettools/library/index.html" target="_blank">http://www.catalyst.com/products/sockettools/library/index.html</a>

Plopping a component on a form,
and using its exposed methods/properties sure seems appealing.

Does anyone have any comments on these ?
or programs/components of similar nature ?


 > 4. Fire up Rick's FTP stuff from Paradox and check
 > for the file (via a timer that would time out after a
 > reasonable period if the file isn't found).
I bought this and it works great.

This needs to work at a client site,
and I can not make *any* modifications to the server.

Thanks for all comments so far.
Robert Wiltshire<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Steve Urbach1

External


Since: Sep 26, 2003
Posts: 3



(Msg. 10) Posted: Wed Feb 09, 2005 12:40 am
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 8 Feb 2005 15:14:58 -0500, "Rodney Wise"
<NoMoreSpamPleaserodney.RemoveThis@ars-florida.com> wrote:

 >1. Find a Windows based command level TelNet
 > Terminal Application. (I'm sure they exist.)
For a Free TELNET, Open a command prompt
Type: Telnet <server.domain>
Win XPpro its a text based screen.
W98 it opens a GUI screen

Also HyperTerm allows telnet (W95 up)

Steve U)



--- _
, | \ MKA: Steve Urbach
, | )erek No JUNK in my email please
, ____|_/ragonsclaw dragonsclawJUNK.RemoveThis@earthJUNKlink.net
, / / / Running United Devices "Cure For Cancer" Project 24/7 Have you helped? <a style='text-decoration: underline;' href="http://www.grid.org" target="_blank">http://www.grid.org</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 11) Posted: Wed Feb 09, 2005 8:18 am
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

  > >1. Find a Windows based command level TelNet
  > > Terminal Application. (I'm sure they exist.)
 > For a Free TELNET, Open a command prompt
 > Type: Telnet <server.domain>
 > Win XPpro its a text based screen.
 > W98 it opens a GUI screen
 >
 > Also HyperTerm allows telnet (W95 up)

Thanks, I know about these already,
as this is how I currently do the work manually,
but I am think these are interactive programs.

Are you saying these can be run from a batch file ?
or that paradox can control the session somehow ?

Thanks
Robert Wiltshire<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Rodney Wise2

External


Since: Mar 31, 2004
Posts: 13



(Msg. 12) Posted: Wed Feb 09, 2005 8:40 am
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Robert Wiltshire" wrote:


 > 3. catalyst dll
<font color=purple> > <a style='text-decoration: underline;' href="http://www.catalyst.com/products/sockettools/library/index.html</font" target="_blank">http://www.catalyst.com/products/sockettools/library/index.html</font</a>>
 >
========================


That one looks interesting. It uses DLL's and provides a feature that might
be just what you're looking for.

see quote below:
-----------------------

<Quotw>
Remote Command Protocol Library
The Remote Command protocol is used to execute a command on a server and
return the output of that command to the client. The SocketTools library
provides an interface to this protocol, enabling applications to remotely
execute a command and process the output. This is most commonly used with
UNIX based servers, although there are implementations of remote command
servers for the Windows operating system. The SocketTools library supports
both the rcmd and rshell remote execution protocols and provides functions
which can be used to search the data stream for specific sequences of
characters. This makes it extremely easy to write Windows applications which
serve as light-weight client interfaces to commands being executed on a UNIX
server or another Windows system. The library can also be used to establish
a remote terminal session using the rlogin protocol, which is similar to how
the Telnet protocol functions.
</Quote>


I see they have a free test download.... have you tried this?


--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 13) Posted: Wed Feb 09, 2005 10:09 am
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > I see they have a free test download.... have you tried this?

Rodney,

Agreed, this dll from catalyst looked very interesting indeed.
I know of at least one person on this list with extensive catalyst
experience,
but not sure if they ever tried this particular toolset.

I have not tried anything yet.
I wanted to give this thread a few days before trying anything.
Who knows, maybe there is a simple windows api for this,
or perhaps someone has used sendkeys or winPostMessage to control the
windows telnet app.

Thanks
Robert Wiltshire<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Larry DiGiovanni2

External


Since: Jul 22, 2004
Posts: 36



(Msg. 14) Posted: Wed Feb 09, 2005 4:26 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Robert Wiltshire wrote:

 > 1 . putty/plink,

I think plink may do what you're looking for. If this is just a tool for
yourself, and you don't mind quick and dirty, I think the plain old
WinNT/2k/XP command-line-only telnet client can also be scripted (through
file redirection), though I am pretty sure you'll have to manually supply
the password each time.

plink can use public key password passing, but I suspect you might have to
make changes on the server to support this.

--
Larry DiGiovanni
Digico, Inc
IT Consulting and Staffing Solutions
<a style='text-decoration: underline;' href="http://www.digicoinc.com" target="_blank">www.digicoinc.com</a>
Check out <a style='text-decoration: underline;' href="http://www.thedbcommunity.com" target="_blank">www.thedbcommunity.com</a> for Paradox resources<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Robert Wiltshire

External


Since: Jun 22, 2003
Posts: 10



(Msg. 15) Posted: Wed Feb 09, 2005 7:40 pm
Post subject: Re: Telnet question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Following up......

#1 I used ShellExecuteA to fire off telnet.exe that comes with windows,
#2 used api FindWindows to get handle of open window.
#3 using handle, called winSendMessage to send name, password, and command
to telnet window
#4 using handle, called winSendMessage to copy text from telnet window to
clipboard
#5 looped and monitored clipboard content until word "done" appeared
#6 used winSendMessage to logoff *nix system
#7 used winSendMessage to close console window

A little on the crude side ,
but it serves my purpose of initiating an action from the workstation.

Thanks for all suggestions.

Robert Wiltshire
 >> Stay informed about: Telnet question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
displaying jpg files - question - Hello, I do not get a very good display when putting jpg files in a graphics field then displaying it on a form. The picture seems indistinct. Are there any hints on how to improve the display quality. The pictures look fine when viewed with Paint Shop....

write to paradox via web - I have a client that uses software developed in delphi. It uses paradox database files. Can these be written to from the web? I am familiar with php/mysql...is there a similar capability with delphi/paradox?

which program? - Hi to all, I'm sorry 'cause I'm not sure this is the correct ng...so my apologies in advance if I'm in the wrong place. My customer show me a floppy disk with old files (about 1998-1999) and told me that there are her accounting data to back life. With...

forcing lck files location - Is there method to force lck files location. I create query on fly with Delphi but there is a problem with lock files. It tries to create it to system32 folder but because user does not have rights to that folder , creating query fails. So, how can I..

Network performance and hardware issues - Hi! Our clients have run our Paradox based apps in small network configurations with only about 10-15 runtime clients at max. Recently we have had inquiries from a bigger company that wants to run our app in an network of over 100 clients, is this..
   Database Help (Home) -> Paradox All times are: Pacific Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]