copy file from vm to local machine command line code example
Example 1: how to scp from vm to local
# Download the file ~/yourFile.xyz to your home directory on your computer
$ scp [email protected]:~/yourFile.xyz ~/.
# Download the folder yourFolder to your home directory on your computer
$ scp -r [email protected]:~/yourFolder ~/.
Example 2: scp virtual machine
# Upload the file yourFile.xyz to your home directory on the VM
$ scp yourFile.xyz [email protected]:~/.
# Upload the folder yourFolder to your home directory on the VM
$ scp -r yourFolder [email protected]:~/.