How do I copy all files inside /directory/subfolder to /directory using SSH?
PS. I'm not going from 1 server to another, I'm just trying copy the files in the subfolder to update the site...
How do I copy all files inside /directory/subfolder to /directory using SSH?
PS. I'm not going from 1 server to another, I'm just trying copy the files in the subfolder to update the site...
I believe you are looking for sftp
and specifically the put
command. Here is some documentation on sftp
.
I'm not too familiar with SSH though I have used WinSCP to do what you asked using an SSH connection. It was fairly easy, though I didn't have to deal with the server-side settings.
scp -r user1@from-server:/dir1 user2@to-server:/dir2
scp -r local-directory user2@to-server:/dir
scp -r user1@from-server:/dir local-directory
Depends on your needs and your underlying OS. If you are on a box with X/windows and are trying copy files, you can use FileZilla, WinSCP and load the files via sftp. Another nice method is to use ExpanDrive, MacFusion, WebDrive (Win/MAC) and simply mount an external directory as a local drive. If you are only interested in a console solution, you maybe want to take a look at "scp".
PULL: