Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a folder from remote machine to local machine? [closed]

Tags:

I am trying scp -r usernameipaddress:/path /pathwhereIwanttocopy, but I am getting it as connection refused.

How can I get it? How can I get connected?

like image 580
Nilesh Agrawal Avatar asked Feb 18 '13 01:02

Nilesh Agrawal


People also ask

How do I SCP a directory from remote to local?

SCP syntax is pretty simple. Just invoke SCP followed by the remote username, @, the IP address or host, colon, and the path to the file. If not specified, the default path is the remote user's home directory. Then, define the local path where the file will be stored locally.

Can you transfer a file from the remote machine to the local machine?

Copy and paste the required file from the remote machine in the cloud storage disk. Now, the file will appear in the file transfer window as shown below. Click the download icon against the file. Now the file will be downloaded to your local machine.

How copy file from remote to local machine in CMD?

The scp command issued from the system where /home/me/Desktop resides is followed by the userid for the account on the remote server. You then add a ":" followed by the directory path and file name on the remote server, e.g., /somedir/table. Then add a space and the location to which you want to copy the file.

How do I move a directory from server to local machine?

You can use either scp or rsync to copy folder and files from local to ssh or copy folder and files from ssh to local within in the same or different directory. By default copy files and folders happen sequentially. If you wish to copy directory and contents in parallel then you must use pscp or pssh tool.


1 Answers

The -r flag should work. In your example you seem to be forgetting the name of the folder you want to copy. Try:

scp -r nameOfFolderToCopy username@ipaddress:/path/to/copy/ 

to copy a folder from your local computer to a remote one. Or

scp -r username@ipaddress:/path/of/folder/to/copy /target/local/directory 

to copy a folder from a remote machine to your local one.

like image 78
Memento Mori Avatar answered Oct 18 '22 01:10

Memento Mori