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"

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 .

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
Xsession.options(5)						File Formats Manual					       Xsession.options(5)

Xsession.options - configuration options for Xsession(5) DESCRIPTION
/etc/X11/Xsession.options contains a set of flags that determine some of the behavior of the Xsession(5) Bourne shell (sh(1)) script. See the Xsession(5) manpage for further information. Xsession.options may contain comments, which begin with a hash mark ('#') and end at the next newline, just like comments in shell scripts. The rest of the file consists of options which are expressed as words separated by hyphens, with only one option per line. Options are enabled by simply placing them in the file; they are disabled by prefixing the option name with 'no-'. Available options are: allow-failsafe If the 'failsafe' argument is passed to the Xsession script, an emergency X session is invoked, consisting of only an x-termi- nal-emulator(1) in the upper-left hand corner of the screen. No window manager is started. If an x-terminal-emulator program is not available, the session exits immediately. allow-user-resources If users have a file called .Xresources in their home directories, these resources will be merged with the default X resources when they log in. allow-user-xsession If users have an executable file called .xsession in their home directories, it can be used as the startup program for the X session (see Xsession(5)). If the file is present but not executable, it may still be used, but is assumed to be a Bourne shell script, and executed with sh(1). use-session-dbus If the dbus package is installed, the session bus will be activated at X session launch. use-ssh-agent If the ssh-agent(1) program is available and no agent process appears to be running already, the X session will be invoked by exec'ing ssh-agent with the startup command, instead of the startup command directly. All of the above options are enabled by default. Additional options may be supported by the local administrator. Xsession(5) describes how this is accomplished. AUTHORS
Stephen Early, Mark Eichin, and Branden Robinson developed Debian's X session handling scripts. Branden Robinson wrote this manual page. SEE ALSO
Xsession(5), ssh-agent(1), x-terminal-emulator(1) Debian Project 2004-10-31 Xsession.options(5)