Access denied when my servlet tries to SSH from Tomcat -


I wrote a circlet which uses the library's Ganima-SS2-build 210. jar (it uses these sections Is: import ch. Ethz.ssh2.Connection; import ch.ethz.ssh2.Session; import ch.ethz.ssh2.StreamGobbler;) to run commands on an SSH connection (for testing purposes it connects to my local machine ). When I run my class as a standalone app, it works, but when I deploy it in Tomcat and Tomcat is started as a starlet, then I get this exception ( I have cut the end, as I thought it was probably not a release, but if it is helpful then I can include it all):

  java.security.AccessControlException: java Access denied on .security (java.net.SocketPermiss Ion 127.0.0.1:22 connect, resolution) Java.lang.SecurityManager.checkPermission (SecurityManager.java) on java.lang.SecurityManager.checkConnect at java.security.AccessController.checkPermission (AccessController.java read 46) Access. ControlContext.checkPermission (AccessControlContext.java:323) Security Manager. Java1034) at java.net.Socket.connect (socket.javaitter13) at ch.ethz.ssh2.transport.transportmanager.establishConnection (transportManager.java:340) ch.ethz.ssh2.transport.TransportManager at Ch.ethz.ssh2. Start (TransportManager.java:448) at Connection.connect. (Connection.java: 643) ...  

Is this perhaps something with security policies? If so, do you know how I change them?

I am using Java 1.6 and Tomcat 6.

"post-text" itemprop = "text">

Are you running a tomcat with security logic? If so, then you have permission to edit $ CATALINA_BASE / conf / catalina.policy and allow access to ch.ethz.ssh2.transport at j.av..net.Socket.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -