org.nerve.tools.ssh.bean.SshInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nerve-ssh Show documentation
Show all versions of nerve-ssh Show documentation
2016年4月25日17:12:24
封装基于SSH的端口转发、文件上传和下载、执行shell等功能
2016年5月13日11:49:57
打包时exclude log4j.properties
The newest version!
package org.nerve.tools.ssh.bean;
import java.io.Serializable;
/**
* SSH链接信息
* com.zeus.ssh
* Created by zengxm on 2015/12/9 0009.
*/
public class SshInfo implements Serializable {
public static final int DEFAULT_PORT = 22;
private String host;
private String user;
private String password;
private int port;
private boolean daemon;
public SshInfo(){
this.port = DEFAULT_PORT;
}
public SshInfo(String host, String user, String password){
this(host, user, password, DEFAULT_PORT);
}
public SshInfo(String host, String user, String password, int port){
this.setHost(host)
.setUser(user)
.setPassword(password)
.setPort(port);
}
public boolean isDaemon() {
return daemon;
}
public SshInfo setDaemon(boolean daemon) {
this.daemon = daemon;
return this;
}
public String getHost() {
return host;
}
public SshInfo setHost(String host) {
this.host = host;
return this;
}
public String getUser() {
return user;
}
public SshInfo setUser(String user) {
this.user = user;
return this;
}
public String getPassword() {
return password;
}
public SshInfo setPassword(String password) {
this.password = password;
return this;
}
public int getPort() {
return port;
}
public SshInfo setPort(int port) {
this.port = port;
return this;
}
@Override
public String toString() {
return "SshInfo{" +
"daemon=" + daemon +
", host='" + host + '\'' +
", user='" + user + '\'' +
", password='" + password + '\'' +
", port=" + port +
'}';
}
}