dbTalk Databases Forums  

executing commands from telnet from D3

comp.databases.pick comp.databases.pick


Discuss executing commands from telnet from D3 in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Art Martz
 
Posts: n/a

Default executing commands from telnet from D3 - 08-18-2005 , 04:08 PM






I have users running a linux desktop using nailed telnet to connect to
D3 running on an aix server.

I'd like to be able to code into a databasic program to cause the telnet
session to execute a command in a sub-shell on the local linux desktop,
returning to the normal telnet mode when the command is finished.

Has anybody done this, or can give me some pointers where to research this?

Thanks, Art

Reply With Quote
  #2  
Old   
(latimerp)
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-18-2005 , 04:44 PM






Art Martz wrote:
Quote:
I have users running a linux desktop using nailed telnet to connect to
D3 running on an aix server.

I'd like to be able to code into a databasic program to cause the telnet
session to execute a command in a sub-shell on the local linux desktop,
returning to the normal telnet mode when the command is finished.

Has anybody done this, or can give me some pointers where to research this?

Thanks, Art
Art it seems like that would be a property of the workstation process.
On a windoz box using Accuterm that is a simple task. But the process
is initiated as so, DATABASIC ---> Terminal Emulator --> Workstation
Process. Can the Terminal emulator be kicked into some shell process by
*returning* escape sequences from the host. What are it's O/S *shelling*
abilities (the emulator)? What is the emulator?

Patrick, <;=)


Reply With Quote
  #3  
Old   
Art Martz
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-18-2005 , 05:58 PM



(latimerp) wrote:
Quote:
snip.... What is the emulator?

konsole.

as in "konsole -e telnet ip.address host.port" It does a decent ansi
emulation.

Art


Reply With Quote
  #4  
Old   
Dave Weaver
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-18-2005 , 07:18 PM



Art,
Before you go out on a limb with exotic solutions, read up on the D3
TCL ! (exclaimation mark) command, which is the same as the sh command
....

!{linux.command}
sh {linux.command}

Like, from within Data/Basic:
EXECUTE "!cat /etc/xxx.conf" CAPTURING NOISE^
and so on.

Dave Weaver, Weaver Consulting


Art Martz wrote:
Quote:
(latimerp) wrote:

snip.... What is the emulator?


konsole.

as in "konsole -e telnet ip.address host.port" It does a decent ansi
emulation.

Art


Reply With Quote
  #5  
Old   
Ross Ferris
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-18-2005 , 10:19 PM



These commands (!cmd ) are executed on the D3 server though - as
patrick said, there isn't a(n easy) way to initiate a command on the
workstation from the server.

Of course the longer is answer is that the AIX box could do a scripted
rlogin to the linux workstation, but I'm not going there !


Reply With Quote
  #6  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-19-2005 , 02:53 AM



"Ross Ferris" wrote:
Quote:
These commands (!cmd ) are executed on the D3 server though - as
patrick said, there isn't a(n easy) way to initiate a command on the
workstation from the server.
Sure there is a way but the solution will cost money and people don't
want to spend money so they're largely left without solutions. I'll
be happy to sell the specs for a solution so that someone else can do
the coding for free.

FWIW, I'm not just making a stupid solicitation here, I'm pointing out
that there are a lot of things that people say are un-doable simply
because they set limits on how they want things done - namely "for
free". There are always solutions, and these days I'll even sell you
just the idea without requiring that you buy my code. What I'm hoping
people will appreciate is that there is value in what we know as well
as in what we do, and when we offer up everything we do for free then
our offerings are perceived as worthless. That goes for all of us.
If your clients want something, tell them they can absolutely have it
- but they will pay you for it or they will pay someone else for it,
or they will not have it. That's just the way it works, at least in
my book. Unfortunately what we see too often in this market is the
"you can't do that" response, and then end-users simply go away to
find someone who can.

TG sorry.for.getting.preachy.again
@
Nebula-RnD
u.got.problems.we.got.solutions.com


Reply With Quote
  #7  
Old   
Art Martz
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-19-2005 , 03:23 PM



Ross Ferris wrote:
Quote:
These commands (!cmd ) are executed on the D3 server though - as
patrick said, there isn't a(n easy) way to initiate a command on the
workstation from the server.

Of course the longer is answer is that the AIX box could do a scripted
rlogin to the linux workstation, but I'm not going there !

Exactly. I'm quite familiar with the ! command. But I need to run the
command on the linux box, not the aix box. The problem with the aix box
doing a rlogin or ftp to the linux box is the aix box has a static ip
address, the linux box does not, and they are not on the same network.
It's doing NAT thru Road Runner, so I don't believe the aix box can find it.

Art


Reply With Quote
  #8  
Old   
Tedd Scofield
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-19-2005 , 04:00 PM



it would have to be a feature of the Terminal program the user is
using. I've not encountered a *nix telnet client that would let you do
that (it would be quite a security risk).
We use wIntegrate where I work, which does have the ability you are
looking for, but afaik thats a windows only solution and doesnt help
you out any =(

I've not encountered any linux based terminal emulators that have this
sort of feature. Of course I've not looked very far.

One possible work around, you could use some ssh tunneling magic to
achive the same effect if you are comfortable with ssh.


Reply With Quote
  #9  
Old   
Frank Winans
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-20-2005 , 12:13 PM



Art Martz wrote
Quote:
I have users running a linux desktop using nailed telnet to connect to
D3 running on an aix server.

I'd like to be able to code into a databasic program to cause the telnet
session to execute a command in a sub-shell on the local linux desktop,
returning to the normal telnet mode when the command is finished.
If you could relax your restrictions a bit this would get much easier;
instead of hijacking the telnet window of the desktop to run the subshell,
you might use one of the text-based console screens {control-alt-F1 through
either ...-F6 or ....-F12, depending on if you've doctored your linux
inittab
to enhance this} to run the subshell. Flip between that screen and the
graphical console, which occupies just one of all the text-based screens,
by having the subshell 'print' the suitable escape sequences to the glass.
And instead of having the distant d3 server actively launch the subshell on
the linux box, maintain a low-priority demon on the linux box that does
a frequent query of some directory on the d3 server, using a readonly nfs
mount or something, via ssh port redirection, or perhaps replace nfs
with a samba disk share at the aix end, and smbclient at the linux end.
Oooh! or maybe you could run the emulator program on linux through
a linux 'tee' command, and have the demon sift through that spare copy
of the message traffic for some special 'launch' message coming out of
your d3 program over yonder! A lot of research, but may be doable.




Reply With Quote
  #10  
Old   
Bill H
 
Posts: n/a

Default Re: executing commands from telnet from D3 - 08-20-2005 , 12:30 PM



Jeeze, Art. If you can't even be sure where machine2 is and how to connect
to it from machine1, how in the world are you going to issue it a command to
execute from machine1?

That said, can the Linux box find the AIX box? If so it could find a flag
to alert it to run its own command, couldn't it?

Bill

"Art Martz" <artmartz (AT) triad (DOT) rr.com> wrote

Quote:
Ross Ferris wrote:
These commands (!cmd ) are executed on the D3 server though - as
patrick said, there isn't a(n easy) way to initiate a command on the
workstation from the server.

Of course the longer is answer is that the AIX box could do a scripted
rlogin to the linux workstation, but I'm not going there !


Exactly. I'm quite familiar with the ! command. But I need to run the
command on the linux box, not the aix box. The problem with the aix box
doing a rlogin or ftp to the linux box is the aix box has a static ip
address, the linux box does not, and they are not on the same network.
It's doing NAT thru Road Runner, so I don't believe the aix box can find
it.

Art



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.