Re: proposed change to ssh_connect_direct()

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

 



On Wed, Jan 11, 2017 at 6:49 PM, Darren Tucker <dtucker@xxxxxxxxxx> wrote:
> On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot@xxxxxxxx> wrote:
>> so I spent a bit of time looking at this and it seems like the only
>> way to go, at least if I want to keep it in ssh_connect_direct(), is
>> to use pthreads. further, it seems like getting that accepted is
>> something of a long shot:
>
> Sorry, pthreads is a non-starter.
>
> I would have thought that using non-blocking connect (ie set
> O_NONBLOCK on the fds, initiate the connections then select on the set
> until one succeeds) would be feasible, though.

d'oh, you're absolutely right. I've spent so much time in golang over
the last 18 months that I'd completely forgotten about O_NONBLOCK.

>> so, approaching this from a different angle, what if I wanted to have
>> something else establish the tcp connection and then fork/dup2/exec
>> ssh and pass off the fd's for the network connection?
>
> That's how ProxyComand and ProxyUseFdpass work.  Your dialler is a
> separate program so it can do whatever you like,

oh man, I think this is exactly what I want. I searched the manpage
for FD and fd, missed Fd

I'll let you know if this doesn't work but I suspect this is perfect
for my use-case.  Thanks!

> including use
> pthreads if that's your thing.

you take that back right now :)

> --
> Darren Tucker (dtucker at zip.com.au)
> GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
>     Good judgement comes with experience. Unfortunately, the experience
> usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux