dbaccss through telnet


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting dbaccss through telnet
# 1  
Old 08-30-2008
dbaccss through telnet

Hi,
The following things I want to do..plz help me...

1) Connect to remote machine(UNIX) by using telnet(by giving usr_nm & passwd)
2) Execute a commands (may be sql query) & store the result
3) Do ftp of the stored result into my local machine(WINDOW)

For all this I am using window command prompt.
The main problem here is to execute the command and get back the result into the local machine Smilie
# 2  
Old 09-01-2008
Have you considered using an SSH client instead of telnet? For example, you could download PuTTY and use the plink.exe to run the remote commands, and then pscp.exe to downlaod the output.
# 3  
Old 09-01-2008
Thanx...
No I didn't think using SSH whether I could do or not!.But can you plz show me this with simple example?
Actually I need the result from the unix remote machine and store the result into local window machine.(The data are actually the result we got by a dbaccess informix query run in the remote unix machine) I need this data for further manipulation using JAVA GUIs Application.
# 4  
Old 09-01-2008
Why not use a proper ODBC connection to the Informix database rather than this convoluted method?
# 5  
Old 09-01-2008
Because for ODBC connection we need INFORMIX driver and this is not free and if it is free then It is for a limited evaluation period.
So I don't want to use ODBC. Instead I can use telnet or SSH..
# 6  
Old 09-01-2008
if you have ssh, you can use winscp
WinSCP :: Download
# 7  
Old 09-01-2008
The easiest way with plink would be to write a script on the remote server that does the query and sends the output to stdout. Then you can just run:

Code:
"C:\Program Files\PuTTY\plink.exe" @hostname /path/to/script > C:\Temp\Output.txt

You would need to set up a PuTTY session named 'hostname' with a private/public key pair so that no password was required to make the connection.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Telnet

Hey everyone. Something has been bothering me. The telnet program, while I know is insecure, offers a ton of functionality. I can literally test any port's availability. I can send commands to web servers, and email servers, and it's a great toubleshooting tool. can any of this be done with SSH?... (6 Replies)
Discussion started by: Lost in Cyberia
6 Replies

2. Shell Programming and Scripting

Telnet

Hi, Need some help on exiting the telnet session from the script. #!/bin/ksh telnet <ip> it would print some text and it would ask for a username and pwd. I jus need to capture the text and i need to come out of the telnet session. is it possible without expect ? (6 Replies)
Discussion started by: giri_luck
6 Replies

3. UNIX for Dummies Questions & Answers

Difference Between Krb5-telnet And Ekrb5-telnet

Hi, I want to know the difference between these two services. Both are under xinetd. Both are used for enabling and disabling Telnet service. So, can somebody please explain me the difference between the two ? Thanks in advance :) (0 Replies)
Discussion started by: kashifsd17
0 Replies

4. UNIX for Dummies Questions & Answers

Automatically login in the telnet from present telnet

Hi, I was writing one script which includes to switch to the another telnet automatically from the present telnet server. I was using rlogin but firstly it takes the same user name of the present telnet and secondly it is prompting for the password. But i want to switch to the another telnet... (2 Replies)
Discussion started by: Prateek
2 Replies

5. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

6. SCO

Telnet

Hello. How can I limit the number of telnet connections in order that from the same IP address it can support at the maximun two simultaneus meetings on SCO Openserver 5.0.7 ? Thanks. (2 Replies)
Discussion started by: jag
2 Replies

7. AIX

Telnet and su -

I have some AIX 4.3 machines which have disabled root telnet access. When you run su - once logged on the machine requests a password and if one is supplied correctly it asks for another users password. How do I configure this? Any help is appreciated. Thank you (0 Replies)
Discussion started by: uXion
0 Replies

8. Programming

telnet

hello sir and all my friends i have a serious problems in creating a telnet protocol with c-program in unix. if any one have this program then please reply me on this mail address. email address removed (4 Replies)
Discussion started by: abhijit deka
4 Replies

9. Shell Programming and Scripting

telnet

Now my task is there are two servers A and B. i only can put unix script in server A and database is on server B. can I write a script in serer A which could telnet to server B and run the script which include sql script and save the output file in server A. did I make my problem clear? (2 Replies)
Discussion started by: YoYo
2 Replies

10. UNIX for Advanced & Expert Users

telnet

Hi All, I have written a script called findwho.sh findwho.sh in Development Server ======== who -M>x I want to copy the file findwho.sh into Production Server and run this script on it then output file x copy back to the Development Server 1) Every time ftp findwho.sh to... (4 Replies)
Discussion started by: krishna
4 Replies
Login or Register to Ask a Question