Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryamanaka2003-11-21 02:40:35 -0500
committeryamanaka2003-11-21 02:40:35 -0500
commite4f6e643e3f6ec5930a65edfe1b5235439774d8b (patch)
tree75c5bc70d694fc3c3e763a6a1e25170919a5aa6e
parent831edcdd637985d3a080f6bf81ba67c42767ddfc (diff)
downloadeclipse.platform.team-e4f6e643e3f6ec5930a65edfe1b5235439774d8b.tar.gz
eclipse.platform.team-e4f6e643e3f6ec5930a65edfe1b5235439774d8b.tar.xz
eclipse.platform.team-e4f6e643e3f6ec5930a65edfe1b5235439774d8b.zip
The tcp port of remote sshd can be specified.
:pserverssh2:ssh_user@ssh_host#port@cvs_user@cvs_host:/path
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/PServerSSH2ServerConnection.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/PServerSSH2ServerConnection.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/PServerSSH2ServerConnection.java
index 89f4737e1..54d9bfeb9 100644
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/PServerSSH2ServerConnection.java
+++ b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/PServerSSH2ServerConnection.java
@@ -85,6 +85,16 @@ public class PServerSSH2ServerConnection implements IServerConnection {
}
}
+ int ssh_port=0;
+ if(ssh_host.indexOf('#')!=-1){
+ try{
+ ssh_port=Integer.parseInt(ssh_host.substring(ssh_host.lastIndexOf('#')+1));
+ ssh_host=ssh_host.substring(0, ssh_host.lastIndexOf('#'));
+ }
+ catch(Exception e){
+ }
+ }
+
int lport=cvs_port;
String rhost=(cvs_host.equals(ssh_host) ? "localhost" : cvs_host);
int rport=cvs_port;
@@ -93,7 +103,7 @@ public class PServerSSH2ServerConnection implements IServerConnection {
int retry=1;
while(true){
try{
- session=JSchSession.getSession(ssh_user, "", ssh_host, 0);
+ session=JSchSession.getSession(ssh_user, "", ssh_host, ssh_port);
String[] list=session.getPortForwardingL();
String name=":"+rhost+":"+rport;
boolean done=false;

Back to the top