scp with alert


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users scp with alert
# 1  
Old 06-01-2010
MySQL scp with alert

If some one copying my file using scp command, that time I need some alert messages[ mail/log] , how can I archive this?.

Last edited by ungalnanban; 06-01-2010 at 02:17 AM..
# 2  
Old 06-01-2010
Better protect your file with proper permission
# 3  
Old 06-01-2010
Quote:
Originally Posted by itkamaraj
Better protect your file with proper permission
I gave permission to access my file to some people, I want to know who are all accessing my file and when he is access.
I need to log who are all using scp and ssh.

Last edited by ungalnanban; 06-01-2010 at 02:36 AM..
# 4  
Old 06-01-2010
Use lsof.

Code:
lsof -i -P | grep sshd

If there is any file transfers, you would see

Code:
sshd      270380     root    3u  IPv4 0xf1000700001f2bb0       0t0  TCP *:22 (LISTEN)
sshd      602222     1583    3u  IPv4 0xf1000700028a63b0   0t18786  TCP sinaorappd2.sg.xx.com:22->xxSNGVDI00739.sg.db.com:3584 (ESTABLISHED)
sshd      602222     1583   20u  IPv4 0xf100070002939e00       0t0  UDP *:743
sshd      684076     root    3u  IPv4 0xf1000700028a63b0   0t18786  TCP sinaorappd2.sg.xx.com:22->xxSNGVDI00739.sg.db.com:3584 (ESTABLISHED)
sshd      684076     root   20u  IPv4 0xf10007000292f800       0t0  UDP *:766

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Cybersecurity

**ALERT**ALERT* Whats app requesting users to upgrade to latest version as; its vulnerability found.

Hello All, Want to share here an article for Whats app users that team whats app is requesting users to upgrade to its latest version since they have found a vulnerability; where Hacker could turn on a cell's camera, mic and scan messages and emails. Here is an article from "THE VERGE" for... (1 Reply)
Discussion started by: RavinderSingh13
1 Replies

2. UNIX for Dummies Questions & Answers

How to use scp?

How to copy multiple directories using single command on solaris 10 from server A to server B. I tried scp but its working only one directory at atime How to acheive this with simple and short solution????? (6 Replies)
Discussion started by: buzzme
6 Replies

3. Shell Programming and Scripting

SCP

Hi All, Please help on the below command scp -r 'directory name'inrvgo@IP:/export/home/muthu/prod_12-09-2010 I am trying to copy a directory from one server to another server using the above command but its displaing the error (missing destination file) but the diectory was there in the... (1 Reply)
Discussion started by: thelakbe
1 Replies

4. AIX

scp

1. how to move files in a directory using scp ? 2. how to move the entire directory ? 3. Will the file and the directory permissions affect scp usage? (1 Reply)
Discussion started by: samsungsamsung
1 Replies

5. Shell Programming and Scripting

Is this possible with SCP?

I normally download a directory recursively using: scp -r <name>@host:<path> . This has worked fine. As everyone knows this will download all of the directory named in <path> and all of the sub directories. I would like to know if it is possible to not download a particular file if it... (5 Replies)
Discussion started by: cpabrego
5 Replies

6. Shell Programming and Scripting

What is scp-ed over?

Hi all, i have a directory in server A. the directory path is /home/kevin. I need to scp the directory to another server B. i would like to ask, when i do a scp of the /home/kevin , i can expect all the files from A to go B. However, how about the hidden files? for example the ssh keys in the... (4 Replies)
Discussion started by: new2ss
4 Replies

7. UNIX for Advanced & Expert Users

Scp

I am trying to transfer a 10g files using scp, but I am getting timeout errors is there anywhere that I can modify a config file or something to increase the time. (4 Replies)
Discussion started by: rbizzell
4 Replies

8. UNIX for Dummies Questions & Answers

ALERT!!! ALERT!!! I messed up the UNIX!!!

Hello If you want a short description read my last thread! I have no root access anymore. No remote access! By user access i get a programm started and when i close it, i got logged off! So I guess I messed up the passwd file! is there a chance of booting a unix system (SCO-UNIX UnixWare... (15 Replies)
Discussion started by: Fwurm
15 Replies
Login or Register to Ask a Question