[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: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 16 Jul 2015 09:41:32 +0200
- To: libssh@xxxxxxxxxx
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
Re: Executing command over forwarded port | Raghaw Shukla <raghaw.wesee@xxxxxxxxx> |
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> |