http://www.ganymed.ethz.ch/ssh2/
Connection conn = new Connection(remote);
conn.connect();
boolean isAuthenticated = conn.authenticateWithPassword(user,pw);
if (isAuthenticated == false) throw new IOException("Authentication failed.");
SCPClient client = new SCPClient(conn);
client.put(theFile, remoteDir, "0644");
conn.close();
从 linux 本身来免 密码呢,参考http://blog.csdn.net/wh_19910525/article/details/7433164