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

相关文章
相关标签/搜索