INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Automatically ftp using specific port

Automatically ftp using specific port

(OP)
Please, your help.

I've trying to make a script for send a file via ftp and specific port I have tried of many different way but it not works.

I tried with the following code but when I run the script I receive a authentication error.

ftp -n '<ip> port' <<END_SCRIPT
quote USER
quote PASSĀ 
cd /path/dest
bin
prompt
put /dir/to/orig/file.txt
bye
END_SCRIPT

Thank you in advance

RE: Automatically ftp using specific port

Your script has no values for username or password so is not going to authenticate.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Automatically ftp using specific port

(OP)
Hello Chris, thanks for your comments.

Yes it has.
I wrote so as an example but maybe I must to be most specific with the code.

ftp -n '<ip>' 'port' <<END_SCRIPT
quote USER ftpuser
quote PASS ftppassword
cd /path/dest
bin
prompt
put /dir/to/orig/file.txt
bye
END_SCRIPT


Error shown

Connected to <ip>
220 Microsoft FTP Service
504 Security mechanism not implemented.
504 Security mechanism not implemented.
KERBEROS_V4 rejected as an authentication type
Remote system type is Windows_NT.
ftp> dir
530 Please login with USER and PASS.
Passive mode refused. Turning off passive mode.
530 Please login with USER and PASS.
ftp: bind: Address already in use
ftp>

Thank you in advance !!

RE: Automatically ftp using specific port

Quote:

I wrote so as an example but maybe I must to be most specific with the code.
Yeah, showing what the code actually isn't, will likely lead to erroneous conclusions. smile

Assuming you are on a Windows machine.
I would suggest you ditch using the M$ Windows FTP client and try WINscp because the error messages make it look like the server wants TLS and the client probably doesn't support it.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Automatically ftp using specific port

(OP)
You right Chris, I'm tryingo to do a ftp from a linux computer to Windows Server but when I try I did receive the error previously mentioned if I do ftp manually I can open the FTP conection, but when I try to do fpt via script I receive the same error. I did open the port 20 and 21 it should works but it is not so.

Thank you Chris for your help.

Br,

RE: Automatically ftp using specific port

(OP)
I fixed the problem thank you very much for your help.

I just needed to use ascii before to send user/password

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close