]>
git.argeo.org Git - gpl/argeo-slc.git/blob - legacy/org.argeo.slc.support/src/org/argeo/slc/jsch/SshTarget.java
1 package org
.argeo
.slc
.jsch
;
5 import com
.jcraft
.jsch
.Session
;
6 import com
.jcraft
.jsch
.UserInfo
;
8 public class SshTarget
{
10 private Integer port
= 22;
12 private UserInfo userInfo
= new SimpleUserInfo();
14 private Boolean usePrivateKey
= true;
15 private File localPrivateKey
= new File(System
.getProperty("user.home")
16 + File
.separator
+ ".ssh" + File
.separator
+ "id_rsa");
19 private transient Session session
;
21 public String
getHost() {
25 public void setHost(String host
) {
29 public Integer
getPort() {
33 public void setPort(Integer port
) {
37 public String
getUser() {
41 public void setUser(String user
) {
45 public UserInfo
getUserInfo() {
49 public void setUserInfo(UserInfo userInfo
) {
50 this.userInfo
= userInfo
;
53 public void setLocalPrivateKey(File localPrivateKey
) {
54 this.localPrivateKey
= localPrivateKey
;
57 public File
getLocalPrivateKey() {
58 return localPrivateKey
;
61 public Boolean
getUsePrivateKey() {
65 public void setUsePrivateKey(Boolean usePrivateKey
) {
66 this.usePrivateKey
= usePrivateKey
;
69 public String
toString() {
70 return getUser() + "@" + getHost() + ":" + getPort();
73 public synchronized Session
getSession() {
77 public synchronized void setSession(Session session
) {
78 this.session
= session
;