how to use SCP (secure copy) in UNIX | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

how to use SCP (secure copy) in UNIX

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-15-2003
dharmesht dharmesht is offline
Registered User
 
Join Date: Dec 2003
Last Activity: 25 May 2007, 5:18 AM EDT
Location: bangalore, india
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
how to use SCP (secure copy) in UNIX

i have to transfer a file from one server to another. say, my script is running on server 'A' and one file has to be transferred from server 'A' to server 'B' using SCP. i am using it as:

sourceserverA> scp -P <port> userid@serverBhostname:/put/this/here <sourcefile path>



but it is giving "secure connection to server'B' refused". is thr any userID problem or syntax error??
Sponsored Links
    #2  
Old 12-15-2003
malcom's Avatar
malcom malcom is offline
Registered User
 
Join Date: Jul 2003
Last Activity: 11 March 2008, 11:47 AM EDT
Location: Germany
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
syntax error

Hi,

you are using the wrong syntax of scp, the first option is the source and the last one is the destination.

So, please try in your script

sourceserverA> scp -P <port> <sourcefile path> userid@serverBhostname:/put/this/here

Regards
Malcom
Sponsored Links
Closed 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
Help with Secure Copy (SCP) command justchill Shell Programming and Scripting 5 09-14-2011 08:20 AM
Secure copy help chrisjones UNIX for Dummies Questions & Answers 3 05-16-2011 10:41 PM
SCP - Secure copy with Certificates exchange. videsh77 UNIX for Dummies Questions & Answers 0 08-23-2005 06:00 AM
how can i secure the unix box? rmuhammad UNIX for Dummies Questions & Answers 1 10-21-2003 03:45 AM
looking for a secure copy program (scp) helios UNIX for Dummies Questions & Answers 4 11-04-2000 07:26 PM



All times are GMT -4. The time now is 08:33 PM.