|
@ -24,7 +24,7 @@ public class SSHLinuxTool {
|
|
|
@Value("${hos.jcraft.host}")
|
|
|
private String host;
|
|
|
@Value("${hos.jcraft.port}")
|
|
|
private Integer port;
|
|
|
private String port;
|
|
|
@Value("${hos.jcraft.user}")
|
|
|
private String user;
|
|
|
@Value("${hos.jcraft.password}")
|
|
@ -41,7 +41,7 @@ public class SSHLinuxTool {
|
|
|
*/
|
|
|
public Session getsessionConn() throws JSchException {
|
|
|
JSch jsch = new JSch();
|
|
|
Session session = jsch.getSession(user, host, port);
|
|
|
Session session = jsch.getSession(user, host, Integer.parseInt(port));
|
|
|
session.setConfig("StrictHostKeyChecking", "no");
|
|
|
// java.util.Properties config = new java.util.Properties();
|
|
|
// config.put("StrictHostKeyChecking", "no");
|