4

I have a folder on my mac that I need to move over to my server. I can ssh in the server but how do i get this folder up....

say I am on my local computer and the folder is named shared and I want to put it on the server in /srv/www/somesite/current. How do i enter the password in my scp command

I found this but i dont think its right

scp -r shared/* [email protected]:/srv/www/somesite/current/shared
1
  • I might suggest using sftp instead of scp. At least for me it's more intuitive.
    – CarlF
    Feb 18, 2011 at 18:45

2 Answers 2

8
scp -r shared [email protected]:/srv/www/somesite/current

will create a folder named 'shared' in somesite/current containing all of the content.

2

You don't need the wildcard:

scp -r shared [email protected]:/srv/www/somesite/current/

Assuming your server is using password auth and the standard SSH port, you should be prompted for a password.

1
  • 1
    You can also use rsync: rsync -aPzv shared [email protected]:/srv/www/somesite/current/
    – Sam Stainsby
    Feb 18, 2011 at 2:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .