[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Executing command over forwarded port


Thanks Andreas.....But this iam implementing on Windows which does not
support socketpair().

On Thu, Jul 16, 2015 at 1:11 PM, Andreas Schneider <asn@xxxxxxxxxxxxxx>
wrote:

> On Thursday 16 July 2015 12:07:06 Raghaw Shukla wrote:
> > In point C the new session should be from local PC to Remote PC?
>
> Here is a step by step description how I would implement it.
>
> a) Create a ssh session and connect
> b) Create a forward channel
> c) Create a socketpair()
> d) One end of the socketpair() is used to read data and write it to the
>    forward channel, and vice versa.
> e) Create a new ssh session
> f) Set the other fd of the socketpair() as the fd for the new session
> g) Connect and exec ...
>
> It should work just fine with a socketpair() but you can also create a tcp
> socket and connect to the port on localhost. I suggest you read the SSH
> RFC to
> understand port forwarding better and read the manpages about sockets and
> socketpair.
>
> --
> Andreas Schneider                   GPG-ID: CC014E3D
> www.cryptomilk.org                asn@xxxxxxxxxxxxxx
>
>
>


-- 
Raghaw Shukla
Software Engineer(AutoPilot Development Team)
Aurora Integrated Systems,Bangalore.
Email:raghaw.shukla@xxxxxxxxxxxxx
Mobile:9972580305

References:
Executing command over forwarded portRaghaw Shukla <raghaw.wesee@xxxxxxxxx>
Re: Executing command over forwarded portAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: Executing command over forwarded portRaghaw Shukla <raghaw.wesee@xxxxxxxxx>
Re: Executing command over forwarded portAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org