From owner-freebsd-questions@FreeBSD.ORG Sat Dec 4 00:56:31 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63B43106566B for ; Sat, 4 Dec 2010 00:56:31 +0000 (UTC) (envelope-from joshsuid@yahoo.com) Received: from nm27.bullet.mail.sp2.yahoo.com (nm27.bullet.mail.sp2.yahoo.com [98.139.91.97]) by mx1.freebsd.org (Postfix) with SMTP id 40ADC8FC19 for ; Sat, 4 Dec 2010 00:56:31 +0000 (UTC) Received: from [98.139.91.61] by nm27.bullet.mail.sp2.yahoo.com with NNFMP; 04 Dec 2010 00:43:32 -0000 Received: from [98.139.91.32] by tm1.bullet.mail.sp2.yahoo.com with NNFMP; 04 Dec 2010 00:43:32 -0000 Received: from [127.0.0.1] by omp1032.mail.sp2.yahoo.com with NNFMP; 04 Dec 2010 00:43:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 331122.11307.bm@omp1032.mail.sp2.yahoo.com Received: (qmail 38697 invoked by uid 60001); 4 Dec 2010 00:43:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291423411; bh=K1bgA+A4vSBCWP9Ci6m8LVKH+TMpIpTViQwpPZ7GEnM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=seY6yzEFim9qwBCmbC/xSWrOJYzyitUVz77fYCLBZRLUgxvIqL77avmP6t3aa6fpYhfrQf/FQrI9Jq8QsUH3obLJApPjHLrTXjp/CFLk+UsdlvercQDSKpMaLcp92dRErYTmi3c3TWU+VlfFt6z4kh74BlgBe5IFLBDcCioUo00= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=31nF1lhC75TuKO7ne0CY6OtzMZB4Y/evSvX1vNuHBOc7ByLz3yuDdezLAUJh4DfD6eKHVYD7Gz7ohpUkIuWyE/FCygrKPn1jbrjQHR5I6skP7qSMMCHCGnIn3Zixyo4AbEBZwj/7ZSo8jwkquRCC02YDGjaL1QDcp2fjWMIICeQ=; Message-ID: <894762.38692.qm@web114415.mail.gq1.yahoo.com> X-YMail-OSG: D7VV4isVM1kOSwmp2bl89CJLmgSe8boV5tVTcjIvv0tz3jD 1qQYgqsJR89GWcVqPN9wP2P3jEg6fcbp6WJgDM6y15v6nVZt58ACPLMAr7KP AN3jm6Yqqif3y7eaGmveGhZYLMzKpjY8tehSw1MDrCJ8byvGWxCl3fwCatSY 2_clCOVWFSaWnJNAS75PN4OxjhTP38CAa.i8mqwzJm5xOI2FsIW6PbXytQHc M_wXzYleHg.en2rfeBoaqclv3xPPyRM5woPGTQlMVlcs- Received: from [64.7.84.114] by web114415.mail.gq1.yahoo.com via HTTP; Fri, 03 Dec 2010 16:43:31 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 Date: Fri, 3 Dec 2010 16:43:31 -0800 (PST) From: Josh Suid To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: ssh interactive session, through intermediate hosts ... problems ... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Dec 2010 00:56:31 -0000 I connect to some systems via a series of ssh "jumps" - something like: # ssh user@host Password: host~/ # ssh user@host2 Password: host2~/ # ssh user@host3 Password: host3~/ # (do some work) This is working well for me and does what I want it to. However, there are some things I'd like to do that are not working well for me... First, where on the ssh client command line (see above) can I specify a more liberal timeout value ? Since my interactive session has three or more layers of host between it, the whole thing falls apart if even one link slows down a bit... how can I make my ssh sessions more tolerant to timeouts ? Alternatively, since I control all of these systems, is there a global FreeBSD setting (sysctl ?) that would do this ? Second, how can I construct this session with just a single command ? When I try this: ssh user@host ssh user@host2 ssh user@host3 I get this error: # ssh user@host ssh user@host2 Pseudo-terminal will not be allocated because stdin is not a terminal. Permission denied (publickey,keyboard-interactive). Is there a way to build this tunnel with a single command ? (an ssh command, run over an ssh command, run over an ssh command) Finally, is there a way to scp a file over intermediate hosts ? That is to say, I want to scp the file: user@host:/some/file to myself, but I want the ssh session to go through hosts X and Y first ... there must be a way to do this where you pipe the output of scp over ssh to ... head spinning... Thanks a lot.