java 使用 ssh 及 scp等 linux 命令、服務,輸入密碼免打斷

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

相關文章
相關標籤/搜索