Guest User

Untitled

a guest
Sep 10th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. JSch Session Connecting
  2. String host="xxxxx.xxx.edu";
  3.  
  4. String user="username";
  5. String password="password";
  6.  
  7. Session session= null;
  8. try{
  9. //Set StrictHostKeyChecking property to no to avoid UnknownHostKey issue
  10. java.util.Properties config = new java.util.Properties();
  11. config.put("StrictHostKeyChecking", "no");
  12. JSch jsch = new JSch();
  13. session=jsch.getSession(user, host, 22);
  14. session.setPassword(password);
  15. session.setConfig(config);
  16. session.connect();
  17. }
  18.  
  19. com.jcraft.jsch.JSchException: java.security.AccessControlException: access denied (java.net.SocketPermission xxxxx.xxx.edu resolve)
  20. at com.jcraft.jsch.Util.createSocket(Util.java:341)
  21. at com.jcraft.jsch.Session.connect(Session.java:194)
  22. at com.jcraft.jsch.Session.connect(Session.java:162)
  23. at com.front.server.GameServiceImpl.createGame(GameServiceImpl.java:39)
Add Comment
Please, Sign In to add comment