Home Man
Today's Posts

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

Help with FTP in UNIX

batch file, ftp file, putty command, unix & linux - unix commands

👤 Login to reply

Thread Tools Search this Thread
# 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
# 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 07:14 AM..
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP in UNIX parthmittal2007 Shell Programming and Scripting 1 07-25-2012 07:18 AM
FTP from windows to unix server using unix shell script Shri123 Shell Programming and Scripting 1 01-25-2012 10:43 PM
UNIX script to FTP file from UNIX server to windows himakiran9 Shell Programming and Scripting 2 11-02-2011 02:35 AM
ftp from windows to unix using a perl script on unix machine raksha.s Shell Programming and Scripting 3 02-26-2009 11:18 PM
unix ftp rakeshforum UNIX for Dummies Questions & Answers 2 01-03-2009 09:21 AM
MVS->Unix FTP : Using chmod as part of FTP. videsh77 UNIX for Advanced & Expert Users 1 10-10-2007 11:12 AM
FTP script to FTP file to UNIX - Solaris bobk544 Shell Programming and Scripting 3 06-20-2007 01:54 PM
Pc to unix ftp Aristo UNIX for Dummies Questions & Answers 1 04-21-2007 10:28 AM
FTP script for sending a file from one unix directory to another unix server director raja_1234 Shell Programming and Scripting 1 11-30-2006 06:57 AM
Unix Ftp JAKEZ UNIX for Dummies Questions & Answers 0 08-30-2004 04:11 AM

All times are GMT -4. The time now is 03:12 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password