[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing command over forwarded port
[Thread Prev] | [Thread Next]
- Subject: Re: Executing command over forwarded port
- From: Raghaw Shukla <raghaw.wesee@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 16 Jul 2015 15:53:30 +0530
- To: libssh@xxxxxxxxxx
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
Executing command over forwarded port | Raghaw Shukla <raghaw.wesee@xxxxxxxxx> |
Re: Executing command over forwarded port | Andreas Schneider <asn@xxxxxxxxxxxxxx> |
Re: Executing command over forwarded port | Raghaw Shukla <raghaw.wesee@xxxxxxxxx> |
Re: Executing command over forwarded port | Andreas Schneider <asn@xxxxxxxxxxxxxx> |