From owner-freebsd-hackers@freebsd.org Fri Aug 31 17:55:23 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4955BFD3675 for ; Fri, 31 Aug 2018 17:55:23 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD33F7E1EC for ; Fri, 31 Aug 2018 17:55:22 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by mail-oi0-x22d.google.com with SMTP id t68-v6so23111625oie.12 for ; Fri, 31 Aug 2018 10:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gM4dnj7ABq1lpD5A+EEawk2540I2tAss+fK4+acPFig=; b=C5S1SLPCrFdUF3zuUwSLOEIpUzIrZ9XTjd86+izJKYEPoNeSEor5Zr2hAneFrEfDnM ZBEl532tQPLJPhKCk+GTtCNsNmIG+2q9lhlMGtNttTCIWbdfNAzS0fypACHsAxgFw0v7 MH2I0xKPK3w9DXiKgakSTJ3gMJ00UDT4FfmMk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gM4dnj7ABq1lpD5A+EEawk2540I2tAss+fK4+acPFig=; b=DUBkVlz6cebp2ufj9/wPJi3YCC7H/ediegjyI0y/91L1S2F7D6BSTCDFjuy0tZMt0P I3wSq4Nqi5BlIg+H7mf+CxRS7IMTsjTiSSHxHSnVqizdPAoUWKGpmQVb+rlgMkKdh7SN la8Ts5MChhsnVMFMBTxrz1rgAcyGoj+DouPKqXW9KmxhBdzBDzBqIZOyLAQ43SQ8BMFd fYXpT7+RYLR7g37dTt1tsuHxDLws8a4TJuDmuKWZgtCJL8ODTwWVFieqHfY4FgMGzLCZ rlx8Ss+wrkh0wRb6SChSPM/xGxa2RWiHNMj7Qfba2Vr32xENUuqszj3tv5e/7sKDX4yN WY/g== X-Gm-Message-State: APzg51AfMAD4CDLUJgGA63W4roSoI2xy7pE6ABNKOAe6E4agNTIlFpMz kRbZpaKDFg5mTKqCr39ifzeNv18B1Ym5RiJnevsfrSf/A3I= X-Google-Smtp-Source: ANB0VdatjGVN8B69P5tNWlZTeNqnrLkgRZIA19o4SfFElqimlI/6YEvoCcqLkEPX2U9qcm4kWb0sKHb/TI+yebg2Biw= X-Received: by 2002:aca:e155:: with SMTP id y82-v6mr8797961oig.90.1535738121328; Fri, 31 Aug 2018 10:55:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:1654:0:0:0:0:0 with HTTP; Fri, 31 Aug 2018 10:55:20 -0700 (PDT) In-Reply-To: <99dde87e-1ddf-e1bc-a1a1-081718100f51@grosbein.net> References: <5B87F083.6080804@grosbein.net> <99dde87e-1ddf-e1bc-a1a1-081718100f51@grosbein.net> From: Mario Lobo Date: Fri, 31 Aug 2018 14:55:20 -0300 Message-ID: Subject: Re: how to use ftp(1) in batch mode To: freebsd-hackers@freebsd.org Cc: Wojciech Puchar Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 17:55:23 -0000 2018-08-31 11:01 GMT-03:00 Eugene Grosbein : > 31.08.2018 20:52, Wojciech Puchar write: > > > thank you. it works. actually even without netrc > > > > (echo command1;echo command2)|ftp ftp://user:password@server/ > > You better not develop a habit typing passwords in command line or URLs, > this is quite insecure. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > I believe that using sftp with authorized keys in batch mode is safer. The batch file would only need to have the actual commands. The only drawback for this method to be fully non-interactive is that you have to take out the passphrase from the private key. -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!]