diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java index 3b4b734e8b7..4f5c4ee6f15 100644 --- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java +++ b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java @@ -20,11 +20,13 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; +import java.util.Hashtable; import java.util.regex.Pattern; import org.eclipse.core.runtime.IProgressMonitor; import com.jcraft.jsch.Channel; +import com.jcraft.jsch.ChannelShell; import com.jcraft.jsch.Session; import org.eclipse.rse.services.shells.AbstractHostShell; @@ -55,6 +57,24 @@ public class SshHostShell extends AbstractHostShell implements IHostShell { //if(fChannel instanceof ChannelShell) { // ((ChannelShell)fChannel).setPty(false); //} + + //Try to set the user envionment. On most sshd configurations, this will + //not work since in sshd_config, PermitUserEnvironment and AcceptEnv + //settings are disabled. Still, it's worth a try. + if (environment!=null && environment.length>0 && fChannel instanceof ChannelShell) { + Hashtable envTable=new Hashtable(); + for(int i=0; i0 && idx