LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-07-2012, 08:22 AM   #1
martowan@gmail.com
LQ Newbie
 
Registered: May 2012
Posts: 11

Rep: Reputation: Disabled
Transferring file to other server in script


hi.
Is there any script that can be run to help me transfer file from one server to the other on the same LAN.

regards
 
Old 11-07-2012, 10:06 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
^ not sure why a script would be necessary... are you not able to run scp from the commandline ?
 
Old 11-07-2012, 10:26 AM   #3
martowan@gmail.com
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
i want to do it automatically each an every day
 
Old 11-07-2012, 10:34 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
so you are sure it works on the commandline ? because reuti's response above seems to suggest there is some issue with connecting to the remote machine ?

obviously, if there is a problem connecting manually, then trying to automate it will make debuggin' much harder ?

Last edited by schneidz; 11-10-2012 at 11:40 AM.
 
Old 11-10-2012, 11:42 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
also, look into setting up public-key-encryption so you can use scp automatedly.
 
Old 11-10-2012, 09:41 PM   #6
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
You can use Scp or Rsync for transfering data between two server .Enable passwordless login between the server.Even Manually you can apply password using sshpass .But it was not secure method of using it in shell script


sshpass -p 'password' scp user-name@scp-server-ip-addressath-of-the-file/file-name /destination-location
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transferring Linux script to a script that can be ran by Windows Doe A Deer Linux - Software 2 01-13-2012 08:35 PM
Transferring file through ssh dstar101 Linux - Newbie 4 01-19-2008 05:08 AM
Transferring file problem satimis Linux - Networking 12 09-14-2007 11:29 AM
ODS-2 file reader (file transferring from VAXstation3100 to linux) the_ube Linux - Software 1 07-19-2007 04:22 PM
what for file transferring solution. yenonn Linux - Networking 1 07-02-2004 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration