From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: suvayu ali Newsgroups: gmane.emacs.help Subject: Re: keyboard macro to record scp (password) Date: Mon, 11 Jul 2011 13:34:23 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1310384197 19196 80.91.229.12 (11 Jul 2011 11:36:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2011 11:36:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: C K Kashyap Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 11 13:36:33 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgEmt-0004kL-Jq for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Jul 2011 13:36:31 +0200 Original-Received: from localhost ([::1]:51754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgEms-0005d1-Qc for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Jul 2011 07:36:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgElC-0005cL-N4 for help-gnu-emacs@gnu.org; Mon, 11 Jul 2011 07:34:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgElB-0001dG-Ho for help-gnu-emacs@gnu.org; Mon, 11 Jul 2011 07:34:46 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:44789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgElB-0001d8-5A for help-gnu-emacs@gnu.org; Mon, 11 Jul 2011 07:34:45 -0400 Original-Received: by bwd14 with SMTP id 14so805912bwd.0 for ; Mon, 11 Jul 2011 04:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=JcIH8g+OlTXEBqj0ecQXQSNPaMMvSrUvfZ2Sw6FI8P0=; b=KQNeXP+v+Ujm4XwEJB0LPXoOlfv0MjbkbF49x+CSMNXKbiqVg4TzyisSEuAIPrfBBI VHgQaUVu1K6icBnBktbyt8i6ao5JUvZS3CztlmGIfJc3QlUVRUwSGU1rt0r0/E+m2Mhg D3Yf9G66j1dH+jUcWmQ3uhY3g2VwlpvwBqL5M= Original-Received: by 10.204.156.25 with SMTP id u25mr2546821bkw.43.1310384083257; Mon, 11 Jul 2011 04:34:43 -0700 (PDT) Original-Received: by 10.204.23.77 with HTTP; Mon, 11 Jul 2011 04:34:23 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: N6SqtTGgsjsmBmwkfpZPTD5rABg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81536 Archived-At: On Mon, Jul 11, 2011 at 1:00 PM, C K Kashyap wrote: > Hi, > I need to do scp multiple times (and in this case, authorized_keys thingy is > not an option). I tried to record a keyboard macro to record the scp action > - including the password entry - but that does not seem to work. The > password gets typed even before the its prompted for. How do I get around > this? You can try these options: 1. Solve it outside emacs with ssh-agent 2. Assuming you are using tramp, you could try ssh instead of scp. ssh keeps the connection open so you do not need to retype the password. However if there is a session expiry policy on the remote end, that cannot be circumvented. > Regards, > Kashyap Hope this helps. -- Suvayu Open source is the future. It sets us free.