Well, it has been asked quite a few times... Thing is, you can't - not in a "normal" way.
Maybe you can write something in C++ or whatever programming language you master.
Wat you normally do when you need to login without any user action is use ssh keys. I found one instruction here: http://www.linuxproblem.org/art_9.html
(I haven't validated it but it looks correct.)