Guest User

Untitled

a guest
Apr 29th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.97 KB | None | 0 0
  1.   75 private void setupSSHConnection(String address) throws ConnectionException {
  2.   76                 // Connect to socket
  3.   77                 connection = new Connection(config.hostname, config.port);
  4.   78                
  5.   79                 // Set up SSH session
  6.   80                 try {
  7.  
  8. // Comment out these 2 lines //
  9.  
  10.   81                         // if (USE_ZLIB_COMPRESSION) clientInterface.broadcastStatus("Enabling ZLIB compression");
  11.   82                         // connection.setCompression(USE_ZLIB_COMPRESSION);
  12.  
  13. // -- //
  14.  
  15.   83                         clientInterface.broadcastStatus("Establishing SSH connection");
  16.   84                         connection.connect();
  17.   85                 } catch (IOException e) {
  18.   86                         e.printStackTrace();
  19.   87                         throw new ConnectionException(ConnectionException.FAILED_AT_CONNECT, config.hostname, "Failed to connect to SSH server, is it running?");
  20.   88                 }
Advertisement
Add Comment
Please, Sign In to add comment