#!/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
**********************************
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
#!/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
+++++++++++++++++++++++++++++++++
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.
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.
++++++++++++++++++++++
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.
hi pkk,
im using get as i need to get some files from unix to windows...
script is actually running on the unix machine using a vnc application which is installed in my windows OS
Since the script is running on a unix machine (considering the source file is available in it), your action should be putting that file from UNIX to Windows.
hi pkk,
i have used put instead of get ...still the file is not coming to windows..
pls see the below log
++++++++++++++++++++++++++
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,45,165)
150 Ok to send data.
226 File receive OK.
45698 bytes sent in 0.0018 seconds (2.4e+04 Kbytes/s)
221 Goodbye.
++++++++++++++++++++++++++++++++++++=
As another poster suggests, take a look at your ftp account on the Windows box and find out where that account's ftp home directory resides. That is where you will find your file if it was transferred successfully.
When mentioning Operating Systems, please be specific. "Windows" and "unix" is just too vague. Also the ftp responses you post don't look like they came from a Microsoft product.
In you ftp logs the server which is answering has 220 (vsFTPd 2.0.1) . Afaik this is a Linux product.
Are you sure that you are connecting to the right computer and not say looping back to yourself?
hi methyl,
Im using a vnc application in windows to connect to a unix server at my work place...
i need to take some file in the remote PC to my windows system using FTP function...
im running this script in the unix machine where my file reside...
please help me ...maybe i need some change in the script.
(Blotting anything confidential like machine names with X's).
On the "Windows" PC, please post the version. e.g. Microsoft Windows XP Professsional SP3.
There are several ways of doing this, but the easiest is to start "My Computer" and look at the help/about tab.
Do you know what VNC software you are running? That might have a built-in file transfer feature.
Do you know what FTP Server software you are running on your PC?
> uname -a
Linux wt-nec2 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
windows 7 is my OS...vnc is installed in it...im getting an output report when i run some scripts and that output ...i need to FTP to my local system(windows 7)...so i added this script to my exisiting script...but not working...