CLI FTP Commands


#1

Hi folks.

I can’t seem to do things using single line commands, due to the way the ProFTPd is set up with DH. They won’t allow this syntax:

username:password@ftp.domain.com

You have to use separate lines for the username with the machine name, then the password on another line. It’s really screwing things up for my needs.

username@ftp.domain.com
password

Can someone point me in the right direction for this? I am using middleware to provide ftp commands, and I’d like to just submit individual commands in order to put and delete items.

Cheers

BeeRich, Toronto, The Beach
Web, Wireless & Database


#2

[quote]I can’t seem to do things using single line commands, due to the way the ProFTPd is set up with DH. They won’t allow this syntax:

username:password@ftp.domain.com[/quote]
Not this again.

From the shell run “man ftp” and it will tell you the arguments that the FTP client accepts.

The syntax above is not a limit of the FTP server. The FTP client has to break down the URL components and pass them to the FTP server one by one regardless.

The FTP client on my server does not accept a URL:[code]NAME
ftp - Internet file transfer program

SYNOPSIS
ftp [-pinegvd] [host [port]]
pftp [-inegvd] [host [port]][/code]It sounds like you need a different FTP client. How do you expect to maintain an FTP session in order to PUT or GET files?

Try using NcFTPPut instead. And again run “man ncftpput” -[code]Reformatting ncftpput(1), please wait…
ncftpput(1) ncftpput(1)

NAME
ncftpput - Internet file transfer program for scripts

SYNOPSIS
ncftpput [options] remote-host remote-directory local-files…

ncftpput -f login.cfg [options] remote-directory local-files…

ncftpput -c remote-host remote-path-name < stdin

OPTIONS
Command line flags:
…[/code]
:cool: openvein.org -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7


#3

Hi there.

I found what I needed.

echo delete bravo.jpg | ftp -p -d ftp://username:password@ftp.domain.com/ftp/bubba/

I am not trying to open a session and do a whole bunch of things. Man FTP did not help in any respect to finding this solution. Your client is different than mine. Here is my man page beginning:

NAME
ftp – Internet file transfer program

SYNOPSIS
[-46AadefginpRtvV] [-N netrc] [-o output] [-P port] [-r retry] [-T
dir,max[,inc]] [[user@]host [port]] [user@]host:[path][/] [file:///path]
[ftp://[user[]@]host[:port]/path[/]]
[[user[]@]host[:port]/path] […]
-u url file […]

The bash shell is what I am using. Again, I don’t expect to maintain a session at all. It’s a single command.

ncftpput isn’t installed.

Anyway, I found what I’m looking for.

Cheers

BeeRich, Toronto, The Beach
Web, Wireless & Database