Help with ssh command in shell script

Hi All,

I am using ssh in my shell script. Can any one please suggest me option so that i can avoid the login message as below in the execution:

NOTE:
Please note that you have logged into the newer version of server "gabbro"
*******

Performing functions to this computer withe the intention of accessing
any computer services, programs or data, to which you are not authorised
is a criminal offence and is prohibited under the Computer Misuse Act 1990.

ANY PERSON OR COMPANY CONTRAVENING THIS POLICY WILL BE SUBJECT TO LEGAL ACTION.

 
man ssh
 
I think ssh -f or ssh -n is wht u r looking for.

No buddy. Its giving something else. I was using ssh -q but still its giving some warning/message

Did you try passwordless ssh?

Ya,

its simply ssh -q user@server

I don't think the system admin of the server running ssh would be happy if they knew you were trying to circumvent their standard warning message.

It depends how you are using SSH in your script. You could filter out the banner using a regex, or maybe try the Expect module.