launching an automated telnet session using dtterm


 
Thread Tools Search this Thread
Operating Systems Solaris launching an automated telnet session using dtterm
# 1  
Old 07-28-2009
launching an automated telnet session using dtterm

Hi ,
I have to write a shell script which would be invoked from a Java program. The job of this script would be to launch a telnet session i was using dtterm for the same and the expect command to automate that.

spawn dtterm -e telnet <server ip address>

expect "Username:"
send "$username\r"
expect "Password:"
send "$pass\r"
interact

The problem here ia m facing is that the above script which is executed from within a java program opens the dtterm as a child process over which i don't have any control in my java program.But i need to kill this tell session when my java programm is getting closed.

Could you tell me how to capture the process id of the this new dtterm process and send it back to my java code which would later kill this telnet session .

//rajeev
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run scripts within a telnet session?

I want to connect to a remote host using telnet there is no username/password verification just telnet remotehost then I need to input some commands for initialization and then I need to repeat the following commands: cmd argument argument is read from a local file, in this... (1 Reply)
Discussion started by: esolve
1 Replies

2. HP-UX

ssh session getting hung (smilar to hpux telnet session is getting hung after about 15 minutes)

Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
Discussion started by: yoda9691
1 Replies

3. UNIX for Dummies Questions & Answers

Disconnecting a telnet session

How can I disconnect an existing telnet session? The host is a serial port server with multiple ports. The users login using the host's name and a port, i.e. telnet host01 1235. Thanks. (14 Replies)
Discussion started by: cooldude
14 Replies

4. UNIX for Dummies Questions & Answers

Telnet Session to AIX

Hello, I have AIX 5.3 at home connected to netgear router. Port Forwarding has been enabled on the router. Problem is that if I want to telnet, I have to try 2 or 3 times before I can get a logon prompt. It times out for first or second time (Connection to session <IP_Address> failed: Connection... (1 Reply)
Discussion started by: bluebee
1 Replies

5. UNIX for Dummies Questions & Answers

Unix Telnet session

Hi Is there any way whilst in a telnet session you can view your client machine name that you are using to connect to the Unix box ? :eek: (2 Replies)
Discussion started by: mlucas
2 Replies

6. Shell Programming and Scripting

Telnet Session

{ sleep 2 echo "$user" sleep 2 echo "$password" sleep 2 echo " ls" sleep 10 echo "exit" }| telnet $server I have a machine x and i have executed the above script on machine 'x'. i entered the... (6 Replies)
Discussion started by: pathanjalireddy
6 Replies

7. Shell Programming and Scripting

Telnet session does not expire

Dear friends.. Our project has a module that runs on handheld devices. Through the handheld we telnet to solaris where the application actually runs. I noticed that after starting a session through the handheld, if i go out of range or if i remove and replace the battery in the handheld, the... (1 Reply)
Discussion started by: deepsteptom
1 Replies

8. UNIX for Dummies Questions & Answers

one time automated ftp session

How can an automated script be setup to run at a later time in the day. cron runs recurring tasks. I am interested in a one time process. I want to back up a number of files whenever I make changes to an application and ftp for backup purposes. The script to automate the zipping of files has... (1 Reply)
Discussion started by: msmkeml
1 Replies

9. UNIX for Dummies Questions & Answers

telnet session timeout

hi, we can set something such that if the user has been idle for a while, it will auto disconnect. where to do so? thanks (6 Replies)
Discussion started by: yls177
6 Replies
Login or Register to Ask a Question
MLDONKEY_COMMAND(1)						  [FIXME: manual]					       MLDONKEY_COMMAND(1)

NAME
mldonkey_command - a wrapper to send command to a mlnet server. SYNOPSIS
mldonkey_command [-P port] [-h host] [-u user] [-p password] [-q] [-s] [-v] {"mlnet command"...} DESCRIPTION
This manual page documents briefly the mldonkey_command command. This manual page was written for the Debian GNU/Linux distribution because the original program is Debian GNU/Linux specific. This program allow you to send command to a mlnet instance. The idea is to provide a simple script to do batch job with mlnet OPTIONS
-P Port of the telnet mldonkey server. By default 4000 -h Host of the telnet mldonkey server. By default localhost -u Username to use while connecting. By default admin -p Password to use while connecting. If none is specified, ask it on stdin -q Run without displaying command result -s Use stdin to enter command -v Display login information "mlnet commands" Any commands you can type in a telnet session connected to mlnet. Try "mldonkey_command longhelp" to see a complete listing. LICENSE
This manual page was originally written by Sylvain Le Gall gildor@debian.org for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Lesser General Public License, Version 2.1 or any later version published by the Free Software Foundation; considering as source code all the file that enable the production of this manpage. SEE ALSO
mlnet (1) AUTHORS
Sylvain Le Gall <gildor@debian.org> Author. Mehdi Dogguy <dogguy@pps.jussieu.fr> Author. COPYRIGHT
Copyright (C) 2003, 2004, 2005, 2006 Sylvain Le Gall Copyright (C) 2009 Mehdi Dogguy [FIXME: source] Mar 14, 2009 MLDONKEY_COMMAND(1)