Quick-tips
SSH Tunneling
ssh -f -N -L local-port:host:remote-port user@personal-sever
-N instructs OpenSSH to not execute a command on the remote system
-f tells ssh to go into the background just before it executes the command
-L tells how the traffic through person-server to tunnel to local machine as in local-port:host:remote-port
example usage: ssh -f -N -L 9443:10.0.69.42:9443 rajith@54.124.15.43
Traffic from 10.0.69.42 port 9443 will be tunneled via 54.124.15.43 to my local machine under port 9443
Java Cryptography Extension (JCE) unlimited strength jurisdiction policy
How install
- Go to Oracle Java SE download page http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Under additional resources you will find "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files"
- Download the version that matches your installed JRE http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
- Uncompress and extract the downloaded file
- Follow the README file there.
- Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security (Note: these jars will be already there so you have to overwrite them)
How to test
Execute the following,
Without the JCE unlimited strength policy files the result would be 128. if the installation is successful the result will be 2147483647
import javax.crypto.Cipher; import java.security.NoSuchAlgorithmException; public class Main { public static void main(String[] args) throws NoSuchAlgorithmException { int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); System.out.println(maxKeyLen); } }
Without the JCE unlimited strength policy files the result would be 128. if the installation is successful the result will be 2147483647
Comments
Post a Comment