Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] ssh -D port host - programmatically

No. You should never need to cast any interfaces to specific classes in org.eclipse.remote. That is why these classes are all marked internal.

The correct way to do this is to ask the IRemoteConnection if it has an IRemotePortForwardingService by calling IRemoteConnection#getService(), i.e.

IRemotePortForwardingService fwdService = remoteConnection.getService(IRemotePortForwardingService.class);

If this returns non-null then you are good to go.

Greg

> On Oct 16, 2015, at 12:19 PM, McCaskey, Alex <mccaskeyaj@xxxxxxxx> wrote:
> 
> Hello, 
> 
> I’m trying to create a connection that essentially does 
> 
> ssh -D port user@host
> 
> What is the appropriate way to do this?
> 
> The way I’m trying to do it now is to grab the IRemoteConnection programmatically, cast it to a JSchConnection and invoke one of the IRemotePortForwardingService methods. Is this the correct way to go? 
> 
> Thanks for your help in advance!
> 
> Alex McCaskey
> Oak Ridge National Laboratory
> Computer Science and Mathematics
> _______________________________________________
> ptp-user mailing list
> ptp-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/ptp-user



Back to the top