From owner-freebsd-hackers Thu Jul 13 17:35:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [195.224.76.132]) by hub.freebsd.org (Postfix) with ESMTP id CF55E37B8F4 for ; Thu, 13 Jul 2000 17:35:32 -0700 (PDT) (envelope-from fanf@chiark.greenend.org.uk) Received: from fanf by chiark.greenend.org.uk with local (Exim 2.05 #1) id 13CtRt-0006Ga-00 (Debian); Fri, 14 Jul 2000 01:35:25 +0100 From: Tony Finch To: jim@reptiles.org Cc: hackers@freebsd.org Subject: Re: patch for openssh to work with pty-redir Newsgroups: chiark.mail.freebsd.hackers In-Reply-To: <20000713182202.C677@reptiles.org> Organization: Linux Unlimited Message-Id: Date: Fri, 14 Jul 2000 01:35:25 +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jim Mercer wrote: > >i was using pty-redir (from netbsd) and ssh to do VPN (ppp over ssh). >under 3.x release, with the ports/ssh, this worked fine. >however, starting with when openssh became part of the system, it stopped >working. >when i did a "pty-redir ssh remhost /usr/sbin/pppd" >the openssh would complain: >"Pseudo-terminal will not be allocated because stdin is not a terminal." > >i managed to get it working with the stock openssh using the following patch. >(yes, it is a quick and ugly hack) Hmm, I was confused for a while there by your reversed patch, but I know where we are now :-) I had a similar problem with user-ppp over ssh talking to an sshd on OpenBSD. The problem turned out to be that if sshd gives you a pty then stdin and stdout are the same bidirectional descriptor (so ppp works) but if that isn't the case then sshd uses two pipes in a unidirectional fashion. FreeBSD's sshd (since March in -CURRENT and April in 4.x) has a tweaked includes.h that doesn't #define USE_PIPES, so stdin is always bidirectional and ppp over ssh works. If your sshd is compiled in this way then you shouldn't need pty-redir either (although I can't find the source to check that it does what I think it does). Thanks to Brian "ppp over ssh over httptunnel" Somers for the explanation! Tony. -- f.a.n.finch fanf@covalent.net dot@dotat.at 404 the crinkley caress of crenulated crevice clips To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message