Guest User

Untitled

a guest
Jul 4th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. String host = "xxx";
  2. String user = "xxx";
  3. String password;
  4.  
  5. Scanner scanner = new Scanner (System.in);
  6. System.out.println("Enter rsa token: ");
  7. password = scanner.nextLine();
  8.  
  9. Session session = jsch.getSession(user, host, 2222);
  10. session.setPassword(password);
  11. session.connect();
  12.  
  13. java.util.Properties config = new java.util.Properties();
  14. config.put("StrictHostKeyChecking", "no");
  15. session.setConfig(config);
  16.  
  17. com.jcraft.jsch.JSchException: Auth cancel
Add Comment
Please, Sign In to add comment