FTP-ing files from Windows server to UNIX server

Thread Tools Search this Thread
Operating Systems Solaris FTP-ing files from Windows server to UNIX server
# 1  
Old 08-11-2014
FTP-ing files from Windows server to UNIX server

I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output.

Is it possible to transfer files from Windows server to unix server through any shell script?

If so can you please help me with the details.

Thanks in Advance.
# 2  
Old 08-11-2014
Dear ssk250,
I have a few to questions pose in response first:-
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (C, shell, perl, awk, etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly, What have you tried so far? You can script up ftp or sftp which will help you move the file. What else do you need to do after that?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.

We're all here to learn and getting the relevant information will help us all.

# 3  
Old 08-11-2014
1. I have tried the sftp command in the below format
sftp username@<ipaddress>

2. It is just showing
Connecting to <ipaddress>....

for a long time and is not returning any ouput or error

3. I am trying to run the sftp command from unix system with solaris version SunOS 5.10
The windows version from which I need to fetch the required files is Microsoft windows server 2008(32-bit)

4. I want to write the code in SHELL (shell script)

5. Basically what I am trying to do is to get the files from the windows server to the unix server through sftp ,,which is not working in this case. Just want to know why it is not connecting . Is it the fact that I need some permissions need to be setup to open the ports for SFTP? and also any other process I need to do for sftp to happen
and also if sftp is not possible for this case ,,, is there any other method to get this


Moderator's Comments:
Mod Comment Please use [CODE] & [/CODE] tags to wrap code, input & output/errors so they are more readable

Last edited by rbatte1; 08-11-2014 at 08:41 AM.. Reason: Added CODE tags, emboldened commands and corrected capitalisation of 'i' to 'I'
# 4  
Old 08-11-2014
If your message is just connecting, does it eventually time out? (30 seconds or longer)

This could be a number of things. let's consider these (maybe not exhaustive list):-
  • Is there an sftp service running on the Windows server?
  • You suggest you use the IP address in the sftp command, but there could still be a name resolution issue. If the client is IP address, then that's fine if that's what you want to do. The server will try to reverse lookup the incoming request though. Can you try a ping unix.ip.address from the Windows server. If that's okay, can you try nslookup unix.ip.address from there too? Do you get a fast & valid response (even if it's a not-found)
  • You might have an invalid route somewhere. Try traceroute windows.ip.address from unix and tracert unix.ip.address from windows and see how far you get matching them up with how the network man would expect them to go.
  • You may have a firewall preventing you from opening the connection. I can't really advise on that though.
Does this get you any further?

This User Gave Thanks to rbatte1 For This Post:
# 5  
Old 08-11-2014
My guess is that the windows system is running ftp rather than sftp. I would try connecting to the windows system with an ftp client to test this theory.
# 6  
Old 08-11-2014
I think he needs ssh for sftp. ftp is not secure. here is a nice, free, windows ssh server: freeSSHd and freeFTPd - open source SSH and SFTP servers for Windows
# 7  
Old 08-11-2014
Dear orange47,

It depends on his application needs, risk exposure and technology rather than just saying "ftp is not secure." We have many servers that do not support SFTP, so we have to work with what we have.

True, it's better but sftp is not uncrackable either.

We will have to wait for the Original Poster to tell us some more.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies

2. Shell Programming and Scripting

Copying the files to Windows server from UNIX server

Hi Team, I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows. I am very new on this concept. Could you please help me or guide in... (4 Replies)
Discussion started by: gvkumar25
4 Replies

3. IP Networking

How to transfer files from UNIX server to windows machine or vice versa using ftp or sftp commands?

hi, i want to write a shell script code which transfers files from a directory in unix server to a directory in a windows machine.. can any1 give me a sample code which uses ftp or sftp command.. thanks very much, (3 Replies)
Discussion started by: Little
3 Replies

4. Shell Programming and Scripting

Sftp some files from windows server to UNIX server

hi i need to transfer some files from windows server to unix server using SFTP. but before transferring the files, i need to check the existence of a particular file in the remote directory (say r_dir1). if the file is present, then SFTP all the files. after SFTPing the files from the remote... (1 Reply)
Discussion started by: vinit raj
1 Replies

5. Shell Programming and Scripting

ftp'ing multiple files to the remote server

unix shell script (2 Replies)
Discussion started by: giridhar276
2 Replies

6. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

7. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

8. Shell Programming and Scripting

shell script to ftp the files from windows to unix server

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)
Discussion started by: kavithakuttyk
10 Replies

9. Shell Programming and Scripting

FTPing files from unix server to windows server

Hi, Below is the script which ftps the file from unix server and putting in a different directory(but on unix server) How can i ftp the files from unix server and to place in a secure location on windows server? what changes needs to be done to the below script? How can this be... (1 Reply)
Discussion started by: venkatesht
1 Replies

10. UNIX for Dummies Questions & Answers

Transfer files from Unix server to Windows using FTP

Dear Friend, I don't know much about unix.I am an VB6.0 Programmer.I need to move an text files as aaa.txt from unix server to windows "D: " driver using the FTP protocol.Is it possible to do this with help of unix shell script.If possible please give some sample codes. Please answer as early... (1 Reply)
Discussion started by: gjsaravanan
1 Replies
Login or Register to Ask a Question

Featured Tech Videos