Disconnecting a telnet session


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Disconnecting a telnet session
# 1  
Old 12-08-2007
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.
# 2  
Old 12-08-2007
usually
Code:
^]   ( ctrl + ] )
close

# 3  
Old 12-08-2007
Yep "Control-]" will take you to a "telnet>" prompt, at which you can type the quit command "q".
# 4  
Old 12-08-2007
For some reason, my previous posts are not showing up on this thread. I tried three times.

That's not what I'm looking for. That only works if I'm have the terminal with the telnet session in front of me. Specifically, I want to use write a script that disconnects an existing telnet session. The telnet sessions do not require user names and passwords; anyone can login by telneting into a host and port number. I do not know from what host the user may be logging from. For example, a user may working be on machine M may log into host H on port P by entering "telnet H P". I may be on machine M2, but I won't know where the other host is logged from, but I do know what host and port the user is logged into because I can't connect to the host-port
I've tried using pexpect to try sending some escape characters into a telnet stream, but I can't even login to the host-port because someone else is already on it.
# 5  
Old 12-08-2007
For some reason, I was not able to post since this afternoon. I tried three times.

That's not what I'm looking for. That only works if I'm have the terminal with the telnet session in front of me. Specifically, I want to use write a script that disconnects an existing telnet session. The telnet sessions do not require user names and passwords; anyone can login by telneting into a host and port number. I do not know from what host the user may be logging from. For example, a user may working be on machine M may log into host H on port P by entering "telnet H P". I may be on machine M2, but I won't know where the other host is logged from, but I do know what host and port the user is logged into because I can't connect to the host-port
I've tried using pexpect to try sending some escape characters into a telnet stream, but I can't even login to the host-port because someone else is already on it.
# 6  
Old 12-09-2007
You mean you want till kill somebody elses telnet session when

(a) you can't actually log into the server; and

(b) you can't log into the client machine the user is telnet'ing from?
# 7  
Old 12-09-2007
You can find their shell process using the "ps" command an kill it.
You need to be root to kill another person's process.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

M5000 XSCF Console disconnecting when putty session is closed

Hi, I would appreciate some help. I remotely access, across a VPN, an M5000 and when I connect to the XSCF I can then access the OS using console -d0 and then I can get to the console. The problem I have is that I need to run something which will take many hours and I can't run it in the... (6 Replies)
Discussion started by: giles.cardew
6 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. Shell Programming and Scripting

bash telnet session logging

I'm looking at allowing remote telnet into my server. like any security-minded administrator, I want to log what my users type on the telnet session. I'm using the script command to generate transcripts of the users session. I have /etc/profile set to automatically start the script command... (2 Replies)
Discussion started by: ramnet
2 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

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

9. Programming

Find the IP address that a telnet session uses

Hello Experts, Happy New Year to all of us, In AIX 4.3.3 I am trying to figure out how is possible to find out the IP address that a telnet session - user uses to login in to host machine. My objective is by finding the login IP address to allow the user to login or not. All users uses the... (6 Replies)
Discussion started by: sszago
6 Replies
Login or Register to Ask a Question