I am able to get files from my local machine to my virtual machine by doing:

scp -P 2222 myfilepath/myfile.csv vmuser@vmhost:/vmfilepath/

I edited this file, and now I would like to do the reverse. I tried:

scp -P 2222 vmfilepath/myfile2.csv myuser@localhost:/myfilepath/

And several variants thereof. It does not accept my password.

Any suggestions to get myfile2.csv from the VM? Either using scp or actually finding the file on my system (I tried searching for it; it does not appear in Finder). I'm currently looking into shared folders, but if that doesn't work I'm still curious why scp isn't working.

1 Answer 1


Try this from your host:

scp -P 2222 vmuser@vmhost:/vmfilepath/myfile2.csv myfilepath/
  • Perfect! It worked! I don't know why I didn't think to try it from my own terminal and not my VM's terminal!
    – wugology
    Aug 3, 2015 at 18:24

You must log in to answer this question.

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