OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: ftp and secure tunnel

From: Aaron Jackson (jacksonnegril.msrce.howard.edu)
Date: Wed Nov 17 2004 - 10:17:33 CST


On Nov 17, 2004, at 8:21 AM, Monah Baki wrote:

> Hi all,
>
> I have 2 openbsd 3.6 servers, a user has a script that needs to run an
> ftp
> command from one server to another. I was hoping that the following
> command:
>
> ssh -L 2021:10.1.1.1:21 user10.1.1.1
>
> will create a tunnel to encrypt the session.
>
> 10.1.1.1 is the server that I need to upload files to and I'm issuing
> this
> command from the other server with an IP address of 10.1.1.2.
>
> Will this work or I'm missing something else.

You can't do this. FTP is a whacky protocol. Anyway, if you are going
to script, a better way is to use scp and a public/private key pair.
That way there is no login interaction i.e. not passwords are being
sent nor are they needed to be stored in a plain text script file.