java RMI via SSH v2 protocol

前端 未结 3 1428
既然无缘
既然无缘 2021-01-23 08:59

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 vi

相关标签:
3条回答
  • 2021-01-23 09:08

    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)).

    0 讨论(0)
  • 2021-01-23 09:11

    Just open up some ssh tunnels via port forwarding and you can do this completely transparently.

    0 讨论(0)
  • 2021-01-23 09:25

    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.

    0 讨论(0)
提交回复
热议问题