]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/jsch/SshTarget.java
17f0426518f2870c1ea94cf13d30b2f31289ba33
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / jsch / SshTarget.java
1 package org.argeo.slc.jsch;
2
3 import java.io.File;
4
5 import com.jcraft.jsch.UserInfo;
6
7 public class SshTarget {
8 private String host;
9 private Integer port = 22;
10 private String user;
11 private UserInfo userInfo;
12
13 private Boolean usePrivateKey = true;
14 private File localPrivateKey = new File(System.getProperty("user.home")
15 + File.separator + ".ssh" + File.separator + "id_rsa");
16
17 public String getHost() {
18 return host;
19 }
20
21 public void setHost(String host) {
22 this.host = host;
23 }
24
25 public Integer getPort() {
26 return port;
27 }
28
29 public void setPort(Integer port) {
30 this.port = port;
31 }
32
33 public String getUser() {
34 return user;
35 }
36
37 public void setUser(String user) {
38 this.user = user;
39 }
40
41 public UserInfo getUserInfo() {
42 return userInfo;
43 }
44
45 public void setUserInfo(UserInfo userInfo) {
46 this.userInfo = userInfo;
47 }
48
49 public void setLocalPrivateKey(File localPrivateKey) {
50 this.localPrivateKey = localPrivateKey;
51 }
52
53 public File getLocalPrivateKey() {
54 return localPrivateKey;
55 }
56
57 public Boolean getUsePrivateKey() {
58 return usePrivateKey;
59 }
60
61 public void setUsePrivateKey(Boolean usePrivateKey) {
62 this.usePrivateKey = usePrivateKey;
63 }
64
65 public String toString() {
66 return "ssh:" + getUser() + "@" + getHost() + ":" + getPort();
67 }
68 }