Presentation is loading. Please wait.

Presentation is loading. Please wait.

Field Trip #28 Securing a VNC Connection with Java By Keith Lynn.

Similar presentations


Presentation on theme: "Field Trip #28 Securing a VNC Connection with Java By Keith Lynn."— Presentation transcript:

1 Field Trip #28 Securing a VNC Connection with Java By Keith Lynn

2 Packages A package is a collection of related classes The package we will use is called Jsch which can be downloaded from www.jcraft.orgwww.jcraft.org This package allows us to make secure connections using the SSH protocol We will use SSH and tunnels to provide a secure connection for VNC

3 JSch The package Jsch contain classes necessary to create a secure connection We create an instance of a Session which we create by using the username, host, and port We then specify additional information We set the property StrictHostKeyChecking to no so we don't get prompted with a question about storing the host when we connect We also can specify which port should be tunneled

4 VNC VNC stands for Virtual Network Computing It will essentially allow us to make a remote desktop connection However, there is no real encryption of passwords So we use SSH to tunnel VNC and this will provide a level of encryption

5 JFrame A JFrame is a top-level container We can add other components to the JFrame In this app, we will add labels, text fields, and a button A JLabel allows us to put a label in the frame A JTextField allows us to get input from the user A JButton allows us to trigger an action

6 Events In order to detect and act on the button click, we will create an event listener The event listener we will create is an ActionListener ActionListener is an interface which contains the method actionPerformed If the listener is registered with the button, then when the button is clicked, actionPerformed is called We can get a reference to the source of the event with the method getSource()

7 SSH SSH is a secure communications protocol It is a replacement for protocols like telnet which wasn't secure In order to make the connection, we must have a server which accepts SSH connections and a client that can connect to the server

8 Executing External Programs in Java When we click the button, we want to execute an external program which will start a vnc viewer In order to execute the program, we will use a ProcessBuilder This class allows us to execute a remote command We must make sure that connect to the ProcessBuilder's input stream and read all of it

9 VncViewer Vncviewer is a free utility that will allow us to connect to a VNC server We specify the port that'd we've tunneled through SSH and use 127.0.0.1 as the hostname If everything is connected correctly, you should see the desktop


Download ppt "Field Trip #28 Securing a VNC Connection with Java By Keith Lynn."

Similar presentations


Ads by Google