This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am working with some software written in Java that incorporates VNC, and I would like to be able to use secure shell to do port forwarding so that we can use localhost ort to do some firewall tunneling. Manually, it works pretty well, as we can log into an ssh server with the port-forward option -L and run a vncviewer at localhost:remote port and view the remote desktop. However, I'd like to make it more seamless for the user by exec-ing ssh in the java code, and passing in the userpassword from an I/O stream. This doesn't work well, and I get the message that there is no controlling tty and that the pseudo-terminal cannot be allocated. Does anyone know a way around this? Thanks, kyle
You might want to consider using a java implementation of SSH. I know there are a few. Using an ssh executable decreases portability. If using ssh is just an option for people who have it, I suggest you eliminate the option and include a java implementation anyway. You shouldn't be using VNC without it.