From owner-freebsd-questions Sat Sep 9 2:46:22 2000 Delivered-To: freebsd-questions@freebsd.org Received: from angeline.dynamine.net (angeline.dynamine.net [198.144.199.173]) by hub.freebsd.org (Postfix) with ESMTP id D475337B59E for ; Sat, 9 Sep 2000 02:46:18 -0700 (PDT) Received: by angeline.dynamine.net (Postfix, from userid 1000) id 51A8B23C299; Sat, 9 Sep 2000 02:44:46 -0700 (PDT) Date: Sat, 9 Sep 2000 02:44:46 -0700 To: cjclark@alum.mit.edu Cc: freebsd-questions@FreeBSD.ORG Subject: ANSWER: Re: ssh problem Message-ID: <20000909024445.B1504@dynamine.net> Reply-To: "Michael S . Fischer" References: <20000907141929.A3960@dynamine.net> <20000907233258.J69158@149.211.6.64.reflexcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20000907233258.J69158@149.211.6.64.reflexcom.com>; from cjclark@reflexnet.net on Thu, Sep 07, 2000 at 11:32:58PM -0700 From: michael@dynamine.net (Michael S. Fischer) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Sep 07, 2000 at 11:32:58PM -0700, Crist J . Clark wrote: > > While I can log in to my FreeBSD (-STABLE as of this AM) box via ssh > > (I'm using RSA authentication), I cannot run any commands on the ssh > > command line (e.g. 'ssh phoenix ls') and get a response. scp does not > > appear to work either to this particular host. > > Can you try running the client as, > > $ ssh -v ls > > And the daemon on the server as, > > # sshd -d > > To get the debug output? I finally figured out what the problem was. After debugging my shell init scripts I found the following code which caused the session to hang in non-interactive mode: # Check for the presence of 'less'. bash returns 127 on `command not # found' errors. less >/dev/null 2>&1 if [ $? -eq 127 ]; then unset -v HAVE_LESS; else HAVE_LESS=yes; fi Changing this to # Check for the presence of 'less'. which less >/dev/null 2>&1 if [ $? -ne 0 ]; then unset -v HAVE_LESS; else HAVE_LESS=yes; fi Seems to have fixed the problem. -- Michael S. Fischer AKA Otterley _O_ Lead Hacketeer, Dynamine Consulting, Silicon Valley, CA | Phone: +1 650 533 4684 | AIM: IsThisOtterley | ICQ: 4218323 | "From the bricks of shame is built the hope"--Alan Wilder net.goth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message