/** * Return a map containing the available cipher types ids and their respective names * * @return a Map object containing cipher type ids and cipher type names */ public static Map<String, String> getCipherTypesMap() { // This method decouples the map from the RemotetoolsPlugin // so its safe to use it on the interface of each environment // that uses this plugin. HashMap<String, String> cipherTypesMap = new HashMap<String, String>(RemotetoolsPlugin.getCipherTypesMap()); return cipherTypesMap; }
/** * Create the SSH connection to the remote target environment. First, {@link * #setConnectionParameters(org.eclipse.ptp.remotetools.environment.control.SSHTargetControl.SSHParameters)} * must be called. * * @param monitor progress monitor * @throws RemoteConnectionException */ protected synchronized void connect(IProgressMonitor monitor) throws RemoteConnectionException { Assert.isNotNull(fAuthInfo, "missing ssh parameters"); // $NON-NLS-1$ /* * Try to connect, else undo the connection. */ if (remoteConnection == null) { remoteConnection = RemotetoolsPlugin.createSSHConnection(); } try { remoteConnection.connect( fAuthInfo, fConfig.getConnectionAddress(), fConfig.getConnectionPort(), fConfig.getCipherType(), fConfig.getConnectionTimeout() * 1000, monitor); } catch (RemoteConnectionException e) { disconnect(); throw e; } }