Suppose I have two solaris servers, A and B, and I am connecting from one server to another using sftp.
Suppose B tries to connect to A using SFTP.
Then How to detect in A the sftp request sent by B ? Is there any way by which I can have a message displayed on the client console(like putty) through which I am logged in to A stating "B is trying to connect to you"?
I thought of running a particular script ,which searches for an sftp in the list of processes, continuously between small spans of time but I think that would not be accurate.
Now can I send a message back to B from A as soon as B succeeds in logging in that will be displayed in client screen through which I am logged in to B?
Can all these be accomplished by shell scripting? I generally get to use solaris, so is there a solaris specific answer?