Pl. refer to: http://javacvs.netbeans.org/doc/jihlava/ext-method.html
... There's known issue with Unix SSH implementations that read passwords directly from keyboard. So there is no way how to set it from Java. (There is workaround: public/private keys handshake with empty private key passphrase.)
Pl. also refer to http://www.netbeans.org/kb/articles/sourceforge.html which provides the steps required.