ssh to a remote host

i want a script with expect or perl or shell which will do ssh to remote host...it will take commandline argument and run the script in remote host.......
i.e that will be like ./ssh.exp remoteip username passwd /tmp.kk.sh

can someone help me on this?

Why not just exchange ssh keys - then a regular ssh command will work for you.
Putting passwords in a script is not a great idea.

And when it asks for a passphrase just hit the enter key - you are trying to avoid passwords....
Quick Logins with ssh Client Keys