How can I start a SH application when someone makes a ssh connection?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How can I start a SH application when someone makes a ssh connection?
# 1  
Old 06-09-2010
Question How can I start a SH application when someone makes a ssh connection?

Hello everyone,

I'm trying to control the access in my server. I did an application that can read audit logs and sys logs with the purpose to send me a report by email with important information about the user. It's a SH file. My problem is start the program when someone makes a ssh connection. Suggestions and advices are welcome.

Thanks,
journey
# 2  
Old 06-09-2010
You may be able to glean the information you want by watching your system logs.

You could also have the users' login scripts notify your management scripts.
# 3  
Old 06-09-2010
Code:
You could also have the users' login scripts notify your management scripts.

How can I do that?
# 4  
Old 06-09-2010
Edit their login script to run the program. What the login script is depends on their login shell. It may be ~/.profile. There may be a global login script at /etc/profile
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 06-09-2010
Thank you so much!!! Great!!...
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

2. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

3. Cybersecurity

What makes up ssh-keygen keys?

When using ssh-keygen what does it look at to build the ssh keys? (1 Reply)
Discussion started by: toor13
1 Replies

4. UNIX for Dummies Questions & Answers

How to start application and keep script running

What I'm looking for is best explained with a little example. #!/bin/bash gedit echo "I need this message to appear while gedit is still running, but it appears only then when I close gedit." Of course most of the times you want the script to wait, but in this case I want to start a new... (5 Replies)
Discussion started by: MrZehl
5 Replies

5. Solaris

Redirect an application with a Serial connection

Hi community, I've currently working on SUN Server V490 and I'm connecting with a Serial port (I DON'T HAVE ANY IP CONNECTIVITY)...I need to redirect the graphic interface of Oracle with the dbca command; I know a way with an IP Connectivity ( use a X-Server and then setenv DISPLAY... (7 Replies)
Discussion started by: Sunb3
7 Replies

6. IP Networking

HOw to start a connection?

Hi, I understand assignment qns are not allowed. However, I need major help.. please teach me how to write a tcp/ip programme using C, wad are the websites that i can refer to? wad are the codes required for it? I have never done tcp/ip configurations before, and never learnt C before,... (13 Replies)
Discussion started by: microuniz
13 Replies

7. Linux

where to put an application if i want to start it on start up

hi i want to know the way by which i put any file somewhere and it get s started when the system restarts or bots i mean whenever my system starts that application must also start thanks (3 Replies)
Discussion started by: shukla_chanchal
3 Replies

8. UNIX for Dummies Questions & Answers

how do i auto start application upon startup?

sorry, i'm a newbie to unix... but how do i or rather where do i write scripts that auto start my application e.g. Informix? in Windows it would be services but in UNIX where can i auto start my informix program? To run informix i just type "oninit". And do i have to login to any user before... (2 Replies)
Discussion started by: doofie
2 Replies

9. UNIX for Advanced & Expert Users

Start application after Oracle has started

Who can tell me how I can see to it that a application doesn't try to start it's processes untill Oracle has completely started. Thanx. (3 Replies)
Discussion started by: Piet
3 Replies
Login or Register to Ask a Question