Home Man
Search
Today's Posts
Register

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

Tags
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
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 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
How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX? 24ajay Shell Programming and Scripting 1 03-14-2014 03:30 AM
File Transfer from Window server to UNIX and UNIX to UNIX yadavricky Shell Programming and Scripting 4 06-25-2013 07:01 AM
How does unix system administration, unix programming, unix network programming differ? thulasidharan2k UNIX for Dummies Questions & Answers 0 06-09-2011 09:40 AM
Running UNIX commands remotely in Windows box from Unix box – avoid entering password D.kalpana UNIX for Dummies Questions & Answers 1 04-20-2007 05:24 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 Sco Open Server, Windows Computers Problem Access Unix Shared Files Help!!!!! haggo Filesystems, Disks and Memory 2 08-23-2006 11:39 AM
Unix History Question: Why are filenames/dirnames case sentsitive in Unix? deckard UNIX for Dummies Questions & Answers 3 03-26-2005 12:59 PM


All times are GMT -4. The time now is 11:01 PM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password