Sponsored Content
Top Forums Shell Programming and Scripting Unable to close telnet session from script Post 302500592 by hergp on Tuesday 1st of March 2011 04:14:16 AM
Old 03-01-2011
Can you post the complete output of what happens when you call your script? Something seems to go wrong during connect or login.
This User Gave Thanks to hergp For This Post:
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. Shell Programming and Scripting

How to close TELNET Connection

Hi, I have logged into a system using Telnet and iam unable to close the connection to connect to the next system using arrays. Iam getting error "Connection Timed Out" Iam using net::Telnet module. Please suggest.. (1 Reply)
Discussion started by: sudhakaryadav
1 Replies

4. Shell Programming and Scripting

closing a telnet session on error, in a shell script

I am using a shell script to telnet into a remote unix server and execute certain commands. But if any command being executed remotely, throws an error, the script just hangs. And the telnet session does not get closed. I want to be able to close the session and complete the script execution in... (1 Reply)
Discussion started by: farahzaiba
1 Replies

5. UNIX for Dummies Questions & Answers

command to close telent session when login incorrect

i need a command to close telnet session wen login incorrect..i want to embed it into my perl script for telnet to check for login incorrect error. (2 Replies)
Discussion started by: raksha.s
2 Replies

6. 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

7. Shell Programming and Scripting

Expect script to automate telnet session

Hi all, I am currently running a daemon which creates a virtual terminal for testing purposes. Essentially, if I were to interact with it manually, this is what I get. john@test1:~$telnet localhost 7777 Trying ::1... Connected to localhost. Escape character is '^]' mip6d> pl eth2... (6 Replies)
Discussion started by: abxccd
6 Replies

8. Shell Programming and Scripting

Work with setsid to open a session and close it correctly

I would like to create the following script: run a python script with setsid python may or may not fail with exception check if all of the group processes were terminated correctly if not, kill the remaining processes How can I do that? Thanks a lot (3 Replies)
Discussion started by: ASF Studio
3 Replies

9. Shell Programming and Scripting

How to break out of hung or waiting telnet session in shell script?

I have to put together telnet instructions for 100s of hosts for verifying basic connectivity and get output in a neat format. Problem- If a telnet is hung with message "Trying .... <hostname" due to firewall or routing issue the commands waits for a very long time before it times out and my... (2 Replies)
Discussion started by: desiphantom
2 Replies
AC(8)							    BSD System Manager's Manual 						     AC(8)

NAME
ac -- display connect time accounting SYNOPSIS
ac [-d | -p] [-t tty] [-w file] [users ...] DESCRIPTION
If the file /var/log/wtmp exists, a record of individual login and logout times are written to it by login(1) and init(8), respectively. The program ac examines these records and writes the accumulated connect time for all logins to the standard output. Options available: -d Display the connect times in 24 hour chunks. -p Display individual user totals. -t tty Only do accounting logins on certain ttys. The tty specification can start with '!' to indicate not this tty and end with '*' to indicate all similarly named ttys. Multiple -t flags may be specified. -w file Read raw connect time data from file instead of the default file /var/log/wtmp. users ... Display totals for the given individuals only. If no arguments are given, ac displays the total amount of login time for all active accounts on the system. The default wtmp file is an infinitely increasing file unless frequently truncated. This is normally done by the daily daemon scripts sched- uled by cron(8), which rename and rotate the wtmp files before truncating them (and keep about a week's worth on hand). No login times are collected, however, if the file does not exist. For example, ac -p -t "ttyd*" > modems ac -p -t "!ttyd*" > other allows times recorded in modems to be charged out at a different rate than other. The ac utility exits 0 on success, and >0 if a fatal error occurs. FILES
/var/log/wtmp connect time accounting file /var/log/wtmp.[0-7] rotated files SEE ALSO
login(1), utmp(5), init(8), sa(8) HISTORY
An ac command appeared in Version 6 AT&T UNIX. This version of ac was written for NetBSD 1.0 from the specification provided by various sys- tems' manual pages. BSD
April 19, 1994 BSD
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy