How to implement java RMI over SSH v2 protocol.Is this possible?.If its not possible then can i achieve this using raw socket communication?.Simply i want to transmit my data via RMI but it should be encrypted as SSH v2 packets .
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Use an API like this http://www.jcraft.com/jsch/ to open an ssh tunnel (port forwarding from local machine to remote, on the port where the RMI service is listening), then configure your RMI client to connect to the local (forwarded) port.
Just open up some ssh tunnels via port forwarding and you can do this completely transparently.
Did you check Using RMI with SSL? The The New RMI article on java.net might be worth the read too.(EDIT: The OP has updated his question and is actually looking for RMI over SSH so I'm updating my answer.
I never tried it but I guess you should be able to tunnel RMI through SSH. I don't see why it shouldn't be possible. Create a SSH tunnel and there you go.
There is a two parts article on javaranch about this, SSH Tunneling for Java RMI Part-I and Part II, that provides more details.
To be honest, I'm not sure why you should prefer SSH over SSL (which has strong authentication too)).