ssh password script

ssh -L 9111:185.222.135.157:9222 -l xxmasrawy localhost
i use this command to open tunnling between server and local host
the return asked me for password
i want to put this command in script and take password from script
what can i do

You can use expect(1) or use key file authentication.

See the links on the bottom or search the forum.

or you can use this technique: Specify Password Only Once for Multiple SSH Connections