Logging remote telnet sessions via script


 
Thread Tools Search this Thread
Operating Systems Solaris Logging remote telnet sessions via script
# 1  
Old 03-25-2011
Logging remote telnet sessions via script

Hi,

My requirement - for security purpose -
I want all root logins to my solaris servers are done by a script kept
in a separate unix box. This script will telnet into remote solaris server with
root user and log every session via log file.

Now my purpose is to log every telnet session happening through this script.
How can this be solved ?

I try to use script command, but script command only works if the user type "exit" after his session. If a user disconnect a session abruptly, it will not log anything.
# 2  
Old 03-25-2011
Quote:
Originally Posted by rahul_jain250
I try to use script command, but script command only works if the user type "exit" after his session. If a user disconnect a session abruptly, it will not log anything.
Read up on the "trap" command for your script. I use it to capture exit codes and perform actions based on a specific code.

HTH
# 3  
Old 03-25-2011
You should use expect... It's quite easy
# 4  
Old 03-26-2011
If you're worried about security and trying to track root logins, the first thing you need to do is stop using telnet and start using ssh for remote access.

As far as tracking logins (and other events) on Solaris, that's what auditing does. Just google "Solaris audit".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Remote Script command logging question

I've noticed that when running a script that connects to a number of our servers (to essentially run batch commands) that the commands aren't logged in the user's .sh_history or .bash_history files. Is there a place where this is logged (assuming the script itself isn't doing the logging and I'm... (3 Replies)
Discussion started by: kneemoe
3 Replies

2. UNIX for Advanced & Expert Users

Logging User Sessions

Hello, I am using a Linux server (Ubuntu 11.04 Server) to host some files and a code repository. Because we are using ssh + svn to connect to the repository, our users have normal ssh access. What I would like to do is log their user sessions so that I have an audit trail in the event that... (2 Replies)
Discussion started by: chrisb1609
2 Replies

3. Shell Programming and Scripting

Executing scipts after logging into a remote host using shell script

Hi All, Sorry if it is a duplicate post. I have not got any reference about this anywhere. I looked at the posts described in SSH - Passing Unix login passwords through shell scripts - Linux / UNIX Forum and it helped me till the point to connect to the host and executing the basic commands.... (3 Replies)
Discussion started by: RSC1985
3 Replies

4. Solaris

Logging Telnet sessions ?

hello guys, Does anybody know how I can log all the telnet sessions for a specific IP. For instance, anybody who make a telnet to IP x.x.x.x this session will be logged. the purpose of it is that I need to know every command that people are running on this node. Any help ? Thanks. (1 Reply)
Discussion started by: cerioni
1 Replies

5. HP-UX

maximum telnet sessions

Currenly my hp-ux server can take the default of 60 telnet connections, i want to know how i can increase this. and also can i effect such changes without doing a reboot. My server is HP-UX B.11.23 (1 Reply)
Discussion started by: tomjones
1 Replies

6. UNIX for Dummies Questions & Answers

Automatic logging (capture screen output) of telnet/ssh sessions on a Solaris node

Hi I am working in Solaris 10 and I want to monitor logs for every telnet/ssh session that tries to connect to the server. I need these logs to be generated in a file that I can fetch using ftp. I am a new user and a stepwise detail will be great BR saGGee (3 Replies)
Discussion started by: saggee
3 Replies

7. Solaris

Logging Telnet Sessions

I am trying to find the following information regarding the logging of telnet sessions within a Solaris 10 environment: (1) How can I tell if the logging of telnet sessions is enabled on a Solaris 10 machine? (2) Assuming that the logging of telnet sessions is not enabled, what is the... (1 Reply)
Discussion started by: RobSand
1 Replies

8. UNIX for Advanced & Expert Users

Limiting telnet sessions on HP UX Box

Anyone know how to limit the telnet sessions on a per user basis on an HP UX Box. I would like to limit the Maximum number of telnet seesions a user can open at any give time to around 4 or 5. I have been looking and looking and do not seem to be able to find anything on this. Any help would be... (2 Replies)
Discussion started by: Witlr
2 Replies

9. Cybersecurity

restricted telnet sessions

On AIX 4.3.3 , how telnet access will be allowed to few users only whereas other will not be able to telnet the server? (6 Replies)
Discussion started by: amit
6 Replies

10. UNIX for Dummies Questions & Answers

How to Re-connect to floating telnet sessions

We use SCO OSR5 with TermLIte to create telnet sessions. If you accidently click X on the TermLite screen and exit the session you leave process running. I've heard of a program that will allow you to re-connect to these 'floating' sessions and then be able to carry on your session. Does anyone... (2 Replies)
Discussion started by: mikeh
2 Replies
Login or Register to Ask a Question