Google
 
Web unafbapune.blogspot.com

Saturday, March 24, 2007

 

ssh tunnelling fun

To access a service that only accepts requests at localhost:9090 at myserver, I can ssh tunnel from mypc to myserver:
ssh -L 9090:localhost:9090 -N myserver
Now, access to localhost:9090 at mypc would be forwarded to localhost:9090 at myserver.

More info on ssh tunnelling here.

Another example:

Say host-A can access host-B whereas mypc can only ssh to host-A but cannot access host-B. To access host-B from mypc:
ssh -N -p 22 -c 3des userid@host-A -L 9090/host-B/9090
Now, access to localhost:9090 at mypc would be forwarded to host-B:9090


jconsole ssh tunnelling

Now say one can normally jconsole via a service url like:
jconsole service:jmx:rmi://myhost:6160/jndi/rmi://myhost:6110/server
But if ports 6160 and 6110 are restricted, it would render jconsole almost useless. Here is how ssh tunnelling may come to rescue (if you are allowed to ssh to the host):
ssh -L 6160:localhost:6160 -N myhost
ssh -L 6110:localhost:6110 -N myhost
jconsole service:jmx:rmi://localhost:6160/jndi/rmi://localhost:6110/server
Oh, don't forget to start up the JVM with
    -Djava.rmi.server.hostname=localhost

Monday, March 19, 2007

 

Sequoia 2.10.6

Ever tried the Sequoia 2.10.6's raidb1 demo ? Here is something interesting: once the demo's local jmx server has been started by the Sequoia controller, you can peek into it via jconsole:
jconsole service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jrmp
and also:
jconsole service:jmx:rmi://localhost/jndi/rmi://localhost:1091/jrmp
if you are running the raidb1 distributed demo.

This page is powered by Blogger. Isn't yours?