FTP using username password at command prompt

OK this one really pisses me off because I searched high and low for something like this. And then I spent too much time trying to find different ways of doing this without resorting to SCP priv/public key distribution. I’m sure its been around since the dawn of time and I’m the last person on earth to figure it out.

GAIA includes a ‘curl’ application.

UGH!

Download:curl -u ftpuser:ftppass -o localfilename  ftp://ftp_server/public_html/xss.php
Upload:curl -u ftpuser:ftppass -T myfile.txt      ftp://ftp.testserver.com

http://www.thegeekstuff.com/2012/04/curl-examples/

Anyways this will simplify the distribution of patches in a large enterprise environment when using scripts.

NOTE: Only exists on gateways and NOT MDS

FYI curl SCP is NOT supported in GAIA (but it is in Unix)

[Expert@NOCgw1:0]# curl -u user:password scp://1.1.1.1/file.txt
curl: (1) libcurl was built without LIBSSH2, scp: not supported!

Geez I hate being the last one to the party.

dreez

Advertisements
Post a comment or leave a trackback: Trackback URL.

Comments

  • Heather  On November 27, 2013 at 8:51 am

    SCP is supported in Gaia if you use a bash shell.

    • Dreezman  On November 27, 2013 at 6:55 pm

      Not sure what you are saying?? I mean curl scp.

      [Expert@NOCgw1:0]# curl -u user:password scp://1.1.1.1/file.txt
      curl: (1) libcurl was built without LIBSSH2, scp: not supported!
      [Expert@NOCgw1:0]#

  • bdmathias  On December 18, 2013 at 2:42 am

    You need to use a capital -O to download files. A lowercase -o will simply output to file.

    • Dreezman  On December 20, 2013 at 9:20 pm

      Hmmm…will have to check it out. I thought I tested this but thanks for heads up.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

blog.lachmann.org

Michael Endrizzi's - St. Paul MN - CheckPoint blog on topics related to Check Point products and security in general.

%d bloggers like this: