http://www.ganymed.ethz.ch/ssh2/ java
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 linux