Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scp command syntax for copying a folder from local machine to a remote server [closed]

Tags:

linux

scp

putty

I am using putty for copying files from local machine to remote server.My folder is in C:/site can any one give syntax for copying folder from C:/site to remote server using scp

like image 505
Warrior Avatar asked May 10 '11 07:05

Warrior


People also ask

How do I copy a folder from local to remote using SCP?

To copy a directory (and all the files it contains), use scp with the -r option. This tells scp to recursively copy the source directory and its contents. You'll be prompted for your password on the source system ( deathstar.com ). The command won't work unless you enter the correct password.

How do I SCP from one remote server to another?

Copy a File Between Two Remote Systems using the scp Command txt from the remote host host1.com to the directory /files on the remote host host2.com . You will be prompted to enter the passwords for both remote accounts. The data will be transfer directly from one remote host to the other.

How copy files from local to remote server?

You can use SecureShell (SSH) or Remote Sync (Rsync) to transfer files to a remote server. Secure Copy (SCP) uses SSH to copy only the files or directories that you select. On first use, Rsync copies all files and directories and then it copies only the files and directories that you have changed.

What is the command for copying files from a remote server?

The scp command copies files or directories between a local and a remote system or between two remote systems. You can use this command from a remote system (after logging in with the ssh command) or from the local system. The scp command uses ssh for data transfer.


2 Answers

scp -r C:/site user@server_ip:path 

path is the place, where site will be copied into the remote server


EDIT: As I said in my comment, try pscp, as you want to use scp using PuTTY.

The other option is WinSCP

like image 105
Kiril Kirov Avatar answered Oct 07 '22 22:10

Kiril Kirov


In stall PuTTY in our system and set the environment variable PATH Pointing to putty path. open the command prompt and move to putty folder. Using PSCP command

Please check this

like image 44
Warrior Avatar answered Oct 07 '22 21:10

Warrior