package rdms;

import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;

public class SSHManager {
	private JSch jsch;
	private String serverName = "servername";
	private String clientServerName = "clientservername";
	private String serverUser = "user";
	private String clientServerUser = serverUser;
	
	private Session sess;
	
	private String hostName = "";
	
	private String serverPassword;
	private String clientServerPassword;
	
	public void connectToServer() {
		jsch = new JSch();
		try {
			Session session = jsch.getSession(serverUser, serverName);
			sess = session;
			System.out.println("Connected to server");
		} catch (JSchException e) {
			System.out.println("CANNOT CONNECT TO SERVER");
			e.printStackTrace();
		}
	}
	public void disconnect() {
		sess.disconnect();
	}
	
	public Session getSession() {
		return sess;
	}
}