Help with FTP in UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Help with FTP in UNIX
# 1  
Old 04-16-2018
Help with FTP in UNIX

Hi All,

I am a beginner in Unix, wanted to know can we FTP one file located in one server to the another server location using Putty. The destination would require user ID and password to access the location. Also, the file that needs to be picked up should have the date of previous day.

Thanks in advance.
# 2  
Old 04-16-2018
Sure. Download pscp (Putty secure copy) program from the putty site.
The link below is a full set of instructions on how to set up pscp. But this involves using a windows box. That is not what you want. Forget putty for this.

You already have everything you need on unix. Free. No downloads. It is called scp, /usr/bin/scp

scp uses the ssh protocol to send files.

The link also has how to set up ssh on Linux/UNIX. That is what you want.

Set up SSH public-key authentication to connect to a remote system

Here is how it works:
On the machine that receives files you create what are called ssh keys. One of those keys is a public key. Keys live in a special directory which is in the same location for every user that wants ssh. You take the public key you just made and place that key on the sender machine(s) in the same special directory.

For every server that has files sent to it you have to set up ssh keys, then place them on remote sender machines(s). So you can have lots of public keys in one sender user's ssh directory. One for each server.

There is a lot more detail to this. Follow the link I gave you.

Once you have ssh keys on the remote sender machine the two commands you need are
Code:
# send file
scp remoteusername@recieverbox myfile /path/to/remote/myfile 
# the date you want is a long string of numbers: [[[[cc]yy]MM]dd]hhmm[.ss]
# yesterday at noon for me is 201804151200   you do not have to use the [.ss] part for seconds
# we have ssh keys setup so ssh works, too.
ssh  remoteusername@recieverbox touch -t 201804151200 /path/to/remote/myfile

#


Last edited by jim mcnamara; 04-16-2018 at 08:14 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP from windows to unix server using unix shell script

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)
Discussion started by: Shri123
1 Replies

2. Shell Programming and Scripting

UNIX script to FTP file from UNIX server to windows

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)
Discussion started by: himakiran9
2 Replies

3. Shell Programming and Scripting

ftp from windows to unix using a perl script on unix machine

i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies

4. UNIX for Advanced & Expert Users

MVS->Unix FTP : Using chmod as part of FTP.

We are transferring file from mainframes to unix, & in FTP process itself we would like to set access rights for unix machine. Has anyone used chmod command in association with site command in ftp? How it should be used? Thanks in advance. (1 Reply)
Discussion started by: videsh77
1 Replies

5. Shell Programming and Scripting

FTP script to FTP file to UNIX - Solaris

Hello, A couple of times per week, i receive emails notifications when files are available for processing. Currently i read these eamails with a java program and store the attachement on my C: drive and would now like to generate a PC script to send this file name up to UNIX-Solaris and... (3 Replies)
Discussion started by: bobk544
3 Replies

6. UNIX for Dummies Questions & Answers

Pc to unix ftp

Hello guys..I am new to Unix, I am trying to transfer a .txt file from my windows PC to my Unix account at school using ftp. I am kind of stuck, can anybody explain to me the steps to do this? (1 Reply)
Discussion started by: Aristo
1 Replies

7. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

8. UNIX for Advanced & Expert Users

ftp on unix

Hi I'm running a batch file that open an ftp connection to UNIX at the same time i wont to run script its write "invalid command" Ofra (1 Reply)
Discussion started by: ofra
1 Replies

9. UNIX for Advanced & Expert Users

ftp from NT to UNIX

PROBLEM !!!!!!! I have files that is on a NT machine. It is located in a directory with subdirectories underneath it. TAR can not be used. I need to use a normal ftp command script to transfer these files from NT to UNIX, or get it from the UNIX machine, including the subdirectories. It must... (5 Replies)
Discussion started by: wolf
5 Replies

10. UNIX for Advanced & Expert Users

ftp from unix to pc

Hi All, How can I get a file as soon as generated into the unix server, it should get transferred into my pc? my pc connected to novell, and I know the ip address of my pc and unix server. reply to : ::email removed:: regards krishna (2 Replies)
Discussion started by: krishna
2 Replies
Login or Register to Ask a Question