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.
1. I have tried the sftp command in the below format
2. It is just showing
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
Thanks
Moderator's Comments:
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'
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.
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.
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.
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)
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)
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)
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)
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)
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)
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)
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)
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)