FTP using script not working (for transfering file from a remote unix server to windows PC.)
hi,
Im using the following code for FTP
Code:
#!/usr/bin/ksh
ftp -v -n "10.29.45.11" << cmd
user "mahesva" "mahesva123"
get rtl.tar
quit
cmd
Below is the log when i run the above code
**********************************
Code:
Connected to 10.29.45.11.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
331 Please specify the password.
230 Login successful.
local: rtl.tar remote: rtl.tar
227 Entering Passive Mode (10,29,45,11,210,37)
150 Opening BINARY mode data connection for rtl.tar (45502 bytes).
WARNING! 196 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 File send OK.
45502 bytes received in 0.046 seconds (9.7e+02 Kbytes/s)
221 Goodbye.
hi PKK45,
i have taken this script from this forum... eventhough its showing that file is sent,im not able to find tht in my c drive of windows..
Please help me troubleshoot..
hi PKK,
i have used ur script as below,
mahesva and mahesva123 are username and password for this VNC server
Code:
#!/usr/bin/ksh
ftp -v -n "10.29.45.11" << cmd
USER "mahesva"
PASS "mahesva123"
get rtl.tar
quit
cmd
but im getting a error
+++++++++++++++++++++++++++++++++
Code:
Connected to 10.29.45.11.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
?Invalid command
?Invalid command
local: rtl.tar remote: rtl.tar
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
221 Goodbye.
+++++++++++++++++++++++++
please help ,as im a beginner in this.
Quote:
Originally Posted by PikK45
May be you have issues here:
Code:
#!/usr/bin/ksh
ftp -v -n "10.29.45.11" << cmd
user "mahesva" "mahesva123"
get rtl.tar
quit
cmd
Rather try using this, when FTPing from UNIX to Windows
Code:
#!/usr/bin/ksh
ftp -v -n "10.29.45.11" << cmd
quote USER $USER
quote PASS $PASS
get rtl.tar
quit
cmd
I have a script and it works fine
Last edited by Franklin52; 07-11-2012 at 05:01 PM..
Reason: Code tags
hi pkk,
thank u...im using the second case..
below is the log file..,im getting ...But transfer is not succes...still im not able to get the file in windows.
++++++++++++++++++++++
Code:
Connected to 10.29.45.11.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
331 Please specify the password.
230 Login successful.
local: rtl.tar remote: rtl.tar
227 Entering Passive Mode (10,29,45,11,226,226)
150 Opening BINARY mode data connection for rtl.tar (45502 bytes).
WARNING! 196 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 File send OK.
45502 bytes received in 0.046 seconds (9.6e+02 Kbytes/s)
221 Goodbye.
++++++++++++++++++++++++++
please help
Last edited by Franklin52; 07-11-2012 at 05:01 PM..
Hi,
Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting?
If so what command i need to use.
thanks in advance. (1 Reply)
I have a problem with ftp. i want to ftp a file "file.txt" from unix box to windows server.
The destination folder is something like this:
"\\windowsservername\apps\is\"
FTPUSER=ftp1
FTPPASS=****
ftp -v -d -n > ftplog <<!EOF
open windowsservername
user $FTPUSER $FTPASS
cd... (3 Replies)
Hi, I am new to this subject.....Can someone please help me out with the script...
unix usernm "sdhftst"
unix pwd "chsd13"
windows usernm "dfghtst"
windows pwd "chsd13"
path..../xxx/xxxxx/xxxxxx/xxxxxxx
please can u get me a script...its only one file to get ftp.
Thanks... (2 Replies)
Hi,
I need to ftp some input files from windows to unix server.All the files will be saved in the C drive in my machine.
Currently all these files are transferring manually to the unix server.I need to write a shell script which ftp the files
from windows to unix box.When I searched in the... (10 Replies)
Hello Gurus,
Naif is implemented for only for port 21 for few windows servers.
I have made my linux 5.1 as my FTP server.
After installing vsftpd i could ftp from other linux server.
linux to linux (ftp server)
But same when i ftp from other windows server which only port 21 is enabled.... (2 Replies)
Hello Gurus,
Naif is implemented for only for port 21 for few windows servers.
I have made my linux 5.1 as my FTP server.
After installing vsftpd i could ftp from other linux server.
linux to linux (ftp server)
But same when i ftp from other windows server which only port 21 is enabled.... (0 Replies)
I am trying to setup an FTP server in a Fedora Core 3 machine through the command line interface and not KDE.
I think I am successful in getting the ftp service running, as when I do an ftp 127.0.0.1, I am able to log in using any one the user accounts I have created on this machine and browse... (8 Replies)