From aefa292547db72d918425f3bef542031c5f04f60 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Wed, 12 Mar 2008 12:07:48 +0000 Subject: [PATCH] [218880] Apply patch from Johnson Ma: UI for SSH keepalives --- .../ssh/SshConnectorResources.java | 12 ++- .../ssh/SshConnectorResources.properties | 13 ++-- .../ssh/SshConnectorService.java | 76 +++++++++++++++++-- .../internal/terminal/ssh/ISshSettings.java | 55 +++++++++++++- .../internal/terminal/ssh/SshConnection.java | 6 +- .../tm/internal/terminal/ssh/SshMessages.java | 5 +- .../terminal/ssh/SshMessages.properties | 5 +- .../tm/internal/terminal/ssh/SshSettings.java | 21 ++++- .../terminal/ssh/SshSettingsPage.java | 8 +- 9 files changed, 180 insertions(+), 21 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java index 1dd53f0e4cf..3da2e17821b 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,8 +8,9 @@ * Contributors: * Martin Oberhuber (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui - * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible - * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared + * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible + * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.rse.internal.connectorservice.ssh; @@ -43,6 +44,9 @@ public class SshConnectorResources extends NLS { public static String KeyboardInteractiveDialog_message; public static String KeyboardInteractiveDialog_labelConnection; - + + public static String SSH_SETTINGS_LABEL; + public static String PROPERTY_LABEL_TIMEOUT; + public static String PROPERTY_LABEL_KEEPALIVE; } diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties index 86244755ee2..3743d6707e1 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties +++ b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. +# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -8,8 +8,9 @@ # Contributors: # Martin Oberhuber (Wind River) - initial API and implementation # Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui -# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible -# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared +# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible +# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared +# Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives ################################################################################ # NLS_MESSAGEFORMAT_VAR @@ -35,6 +36,6 @@ UserValidationDialog_7=Saved passwords are stored on your computer in a file tha KeyboardInteractiveDialog_message=Keyboard Interactive authentication for {0} KeyboardInteractiveDialog_labelConnection=Enter values for the following connection: {0} - - - +SSH_SETTINGS_LABEL=SSH Settings +PROPERTY_LABEL_TIMEOUT=timeout (sec) +PROPERTY_LABEL_KEEPALIVE=keepalive (sec) diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java index e696093d1b2..37f09eb0601 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java @@ -15,8 +15,9 @@ * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected * Martin Oberhuber (Wind River) - [203500] Support encodings for SSH Sftp paths * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection - * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible - * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared + * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible + * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.rse.internal.connectorservice.ssh; @@ -45,7 +46,11 @@ import com.jcraft.jsch.UserInfo; import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ILabeledObject; +import org.eclipse.rse.core.model.IProperty; +import org.eclipse.rse.core.model.IPropertySet; import org.eclipse.rse.core.model.ISystemRegistry; +import org.eclipse.rse.core.model.PropertyType; import org.eclipse.rse.core.model.SystemSignonInformation; import org.eclipse.rse.core.subsystems.CommunicationsEvent; import org.eclipse.rse.core.subsystems.IConnectorService; @@ -67,6 +72,12 @@ public class SshConnectorService extends StandardConnectorService implements ISs { private static final int SSH_DEFAULT_PORT = 22; private static final int CONNECT_DEFAULT_TIMEOUT = 60; //seconds + + /** Property Keys. These are API because they are stored persistently. */ + private static final String PROPERTY_SET_SSH_SETTINGS = "SSH Settings"; //$NON-NLS-1$ + private static final String PROPERTY_KEY_TIMEOUT = "timeout(sec)"; //$NON-NLS-1$ + private static final String PROPERTY_KEY_KEEPALIVE = "keepalive(sec)"; //$NON-NLS-1$ + private Session session; private SessionLostHandler fSessionLostHandler; /** Indicates the default string encoding on this platform */ @@ -75,6 +86,7 @@ public class SshConnectorService extends StandardConnectorService implements ISs public SshConnectorService(IHost host) { super(SshConnectorResources.SshConnectorService_Name, SshConnectorResources.SshConnectorService_Description, host, SSH_DEFAULT_PORT); fSessionLostHandler = null; + getPropertySet(); } //---------------------------------------------------------------------- @@ -93,9 +105,35 @@ public class SshConnectorService extends StandardConnectorService implements ISs if (service == null) return null; Session session = service.createSession(hostname, port, username); - //session.setTimeout(getSshTimeoutInMillis()); - session.setTimeout(0); //never time out on the session - session.setServerAliveInterval(300000); //5 minutes + + IPropertySet propertySet = getPropertySet(); + String timeoutStr = propertySet.getPropertyValue(PROPERTY_KEY_TIMEOUT); + int timeout = 0; //default is never timeout + try { + int value = Integer.parseInt(timeoutStr); + if (value > 0) { + timeout = value * 1000; + } + } catch (NumberFormatException e) { + //wrong input - should never happen because property type is Integer + } + session.setTimeout(timeout); + + int keepalive = 300000; //default is 5 minutes + String keepaliveStr = propertySet.getPropertyValue(PROPERTY_KEY_KEEPALIVE); + try { + int value = Integer.parseInt(keepaliveStr); + if (value >= 0) { + keepalive = value * 1000; + } + } catch (NumberFormatException e) { + //wrong input - should never happen because property type is Integer + } + if (keepalive > 0) { + session.setServerAliveInterval(keepalive); + } + + session.setServerAliveCountMax(6); //give up after 6 tries (remote will be dead after 30 min) if (password != null) session.setPassword(password); @@ -578,5 +616,33 @@ public class SshConnectorService extends StandardConnectorService implements ISs public boolean requiresUserId() { return false; } + + private IPropertySet getPropertySet() + { + IPropertySet propertySet = getPropertySet(PROPERTY_SET_SSH_SETTINGS); + if(propertySet==null) { + propertySet = createPropertySet(PROPERTY_SET_SSH_SETTINGS); + } + if (propertySet instanceof ILabeledObject) { + //RSE 3.0 and later: translatable labels for properties + String label = SshConnectorResources.SSH_SETTINGS_LABEL; + ((ILabeledObject)propertySet).setLabel(label); + } + + //timeout + IProperty p = propertySet.getProperty(PROPERTY_KEY_TIMEOUT); + if (p==null) { + p = propertySet.addProperty(PROPERTY_KEY_TIMEOUT, "0", PropertyType.getIntegerPropertyType()); //$NON-NLS-1$ + } + p.setLabel(SshConnectorResources.PROPERTY_LABEL_TIMEOUT); + + //keepalive + p = propertySet.getProperty(PROPERTY_KEY_KEEPALIVE); + if (p==null) { + p = propertySet.addProperty(PROPERTY_KEY_KEEPALIVE,"300", PropertyType.getIntegerPropertyType()); //$NON-NLS-1$ + } + p.setLabel(SshConnectorResources.PROPERTY_LABEL_KEEPALIVE); + return propertySet; + } } diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java index 8c1b7805828..4c389be56df 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java +++ b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,18 +8,71 @@ * Contributors: * Michael Scharf (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - fixed copyright headers and beautified + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.tm.internal.terminal.ssh; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; public interface ISshSettings { + /** + * Get the host name or IP address of remote system to connect. + * @return host name or IP address of the remote system. + */ String getHost(); + + /** + * Get the login name for connecting to the remote system. + * @return remote login name + */ String getUser(); + + /** + * Get the password for connecting to the remote system. + * May be empty if connecting via SSH public key authentication + * (with or without passphrase). + * @return password to use + */ String getPassword(); + + /** + * Get the timeout (in seconds) after which the SSH connection is assumed dead. + * @return timeout (in seconds) for the SSH connection. + */ int getTimeout(); + + /** + * Get the keepalive interval (in seconds). + * After this time of inactivity, the SSH connector will send a message to the + * remote system in order to avoid timeouts on the remote. A maximum of 6 + * keepalive messages will be sent if enabled. When set to 0, the keepalive + * feature is disabled. + * @return interval (in seconds) for keepalive messages. + */ + int getKeepalive(); + + /** + * Get the TCP/IP port on the remote system to use. + * @return TCP/IP port on the remote system to use. + */ int getPort(); + + /** + * Return a human-readable String summarizing all relevant connection data. + * This String can be displayed in the Terminal caption, for instance. + * @return a human-readable String summarizing relevant connection data. + */ String getSummary(); + + /** + * Load connection data from a settings store. + * @param store the settings store to access. + */ void load(ISettingsStore store); + + /** + * Store connection data into a settings store. + * @param store the settings store to access. + */ void save(ISettingsStore store); } diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java index 7f347fe98ff..04c27793f29 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java +++ b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java @@ -13,6 +13,7 @@ * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected * Mikhail Kalugin - [201864] Fix Terminal SSH keyboard interactive authentication * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.tm.internal.terminal.ssh; @@ -68,7 +69,6 @@ class SshConnection extends Thread { Session session = service.createSession(hostname, port, username); //session.setTimeout(getSshTimeoutInMillis()); session.setTimeout(0); //never time out on the session - session.setServerAliveInterval(300000); //5 minutes session.setServerAliveCountMax(6); //give up after 6 tries (remote will be dead after 30 min) if (password != null) session.setPassword(password); @@ -87,6 +87,7 @@ class SshConnection extends Thread { public void run() { try { int nTimeout = fConn.getTelnetSettings().getTimeout() * 1000; + int nKeepalive = fConn.getTelnetSettings().getKeepalive() * 1000; String host = fConn.getTelnetSettings().getHost(); String user = fConn.getTelnetSettings().getUser(); String password = fConn.getTelnetSettings().getPassword(); @@ -108,6 +109,9 @@ class SshConnection extends Thread { //config.put("StrictHostKeyChecking", "no"); //session.setConfig(config); //ui.aboutToConnect(); + if (nKeepalive > 0) { + session.setServerAliveInterval(nKeepalive); //default is 5 minutes + } session.connect(nTimeout); // making connection with timeout. ChannelShell channel=(ChannelShell) session.openChannel("shell"); //$NON-NLS-1$ diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java index ca912590635..d24753a17bb 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java +++ b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * Michael Scharf (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - fixed copyright headers and beautified + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.tm.internal.terminal.ssh; @@ -22,6 +23,8 @@ public class SshMessages extends NLS { public static String PORT; public static String PASSWORD; public static String TIMEOUT; + public static String KEEPALIVE; + public static String KEEPALIVE_Tooltip; public static String WARNING; public static String INFO; diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties index b3e54267791..b2f0806a9a3 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties +++ b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. +# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -8,12 +8,15 @@ # Contributors: # Michael Scharf (Wind River) - initial API and implementation # Martin Oberhuber (Wind River) - fixed copyright headers and beautified +# Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives ############################################################################### HOST = Host USER = User PORT = Port PASSWORD = Password TIMEOUT = Timeout (sec) +KEEPALIVE = KeepAlive (sec) +KEEPALIVE_Tooltip=Interval for sending keepalive messages in case of inactivity. Enter 0 to disable keepalives. WARNING = Warning INFO = Info diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java index 45c469dff73..3aa99536803 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java +++ b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,6 +9,7 @@ * Michael Scharf (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - fixed copyright headers and beautified * Mikhail Kalugin - [201867] Improve Terminal SSH connection summary string + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.tm.internal.terminal.ssh; @@ -20,6 +21,7 @@ public class SshSettings implements ISshSettings { protected String fPassword; protected String fPort; protected String fTimeout; + protected String fKeepalive; public String getHost() { return fHost; } @@ -41,6 +43,7 @@ public class SshSettings implements ISshSettings { fUser = store.get("User");//$NON-NLS-1$ fPort = store.get("Port");//$NON-NLS-1$ fTimeout = store.get("Timeout");//$NON-NLS-1$ + fKeepalive = store.get("Keepalive");//$NON-NLS-1$ } @@ -49,6 +52,7 @@ public class SshSettings implements ISshSettings { store.put("User", fUser);//$NON-NLS-1$ store.put("Port", fPort);//$NON-NLS-1$ store.put("Timeout", fTimeout);//$NON-NLS-1$ + store.put("Keepalive", fKeepalive);//$NON-NLS-1$ } @@ -66,6 +70,21 @@ public class SshSettings implements ISshSettings { public void setTimeout(String timeout) { fTimeout = timeout; } + + public int getKeepalive() { + try { + return Integer.parseInt(fKeepalive); + } catch (NumberFormatException numberFormatException) { + return 300; + } + } + public String getKeepaliveString() { + return fKeepalive; + } + + public void setKeepalive(String keepalive) { + fKeepalive = keepalive; + } public String getUser() { return fUser; diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java index 5ae8292f4a1..35d6b800bb5 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java +++ b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * Michael Scharf (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - fixed copyright headers and beautified + * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives *******************************************************************************/ package org.eclipse.tm.internal.terminal.ssh; @@ -23,6 +24,7 @@ public class SshSettingsPage implements ISettingsPage { private Text fHostText; private Text fUser; private Text fTimeout; + private Text fKeepalive; private final SshSettings fTerminalSettings; private Text fPort; private Text fPassword; @@ -36,12 +38,14 @@ public class SshSettingsPage implements ISettingsPage { fTerminalSettings.setPassword(fPassword.getText()); fTerminalSettings.setPort(fPort.getText()); fTerminalSettings.setTimeout(fTimeout.getText()); + fTerminalSettings.setKeepalive(fKeepalive.getText()); } public void loadSettings() { if(fTerminalSettings!=null) { fHostText.setText(get(fTerminalSettings.getHost(),""));//$NON-NLS-1$ fTimeout.setText(get(fTerminalSettings.getTimeoutString(),"0"));//$NON-NLS-1$ + fKeepalive.setText(get(fTerminalSettings.getKeepaliveString(),"300"));//$NON-NLS-1$ fUser.setText(get(fTerminalSettings.getUser(),""));//$NON-NLS-1$ fPort.setText(get(fTerminalSettings.getPortString(),"22"));//$NON-NLS-1$ fPassword.setText(get(fTerminalSettings.getPassword(),""));//$NON-NLS-1$ @@ -67,6 +71,8 @@ public class SshSettingsPage implements ISettingsPage { fUser = createTextField(composite, SshMessages.USER); fPassword = createTextField(composite, SshMessages.PASSWORD,SWT.PASSWORD); fTimeout = createTextField(composite, SshMessages.TIMEOUT); + fKeepalive = createTextField(composite, SshMessages.KEEPALIVE); + fKeepalive.setToolTipText(SshMessages.KEEPALIVE_Tooltip); fPort = createTextField(composite, SshMessages.PORT); loadSettings(); }