Solved

copying  files btween different servers?

Posted on 2004-09-18
3
173 Views
Last Modified: 2010-04-20
I am using ssh to connect to different servers. I want to copy files from the other servers into my machine. what command i should issue to do that?
Thanks
0
Comment
Question by:Carl3003
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Mysidia earned 50 total points
ID: 12094257
scp

If you want to upload from the remote server to your own then [on the remote server]

scp filename  username@destination.hostname.com:/path/to/directory/

If you want to download from the remote server then

scp username@hostname.that.has.file:/path/to/name_of_file_to_download  /local/path/to/directory/
0
 

Author Comment

by:Carl3003
ID: 12097462
I was able to load files but i could not upload files.

Was this the command to upload to the remote server?
scp filename  username@destination.hostname.com:/path/to/directory/
0
 
LVL 23

Expert Comment

by:Mysidia
ID: 12098175
Yes, that's the syntax to upload a file to a remote ssh server with scp.

The destination directory needs to already exist

The -r option can also be used to download/upload entire directories recursively also

The  man scp  
command should bring up the manual page for the utility, by the way.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now