I provide two methods of up/down load file between remote and local machine(I use Mac air):
In this case, I want to up/down "11.jpeg "11.jpeg between local and remote:
1.
Copy files on service to local dir: You must be in local bash terminal to conduct this command, not when you are in ssh!
scp username@domain:/home/xxx/xxx/11.jpeg /Users/username/Desktop/ copy files in local dir to remote service : also you must be in local bash terminal
scp /Users/username/Desktop/11.jpeg username@domain:/home/xxx/xxx To achieve the same intention when you are logging in the SSH, you must first set “System Preferences>sharing>remote log in>all users(I am not sure if you must set for "all users", but it works in this situation)” the Mac will tell you"To log in to this computer remotely, type : ssh username@xxxxxx, then type in the command below:
**scp username@domain:/home/xxx/xxx/11.jpeg username@xxxxxx:/Users/username/Desktop/** -
Copy files on service to local dir: You must be in local bash terminal to conduct this command, not when you are in ssh!
scp username@domain:/home/xxx/xxx/11.jpeg /Users/username/Desktop/copy files in local dir to remote service : also you must be in local bash terminal
scp /Users/username/Desktop/11.jpeg username@domain:/home/xxx/xxx To achieve the same intention when you are logging in the SSH, you must first set “System Preferences>sharing>remote log in>all users(I am not sure if you must set for "all users", but it works in this situation)” the Mac will tell you"To log in to this computer remotely, type:
ssh username@xxxxxx, then type in the command below: scp username@domain:/home/xxx/xxx/11.jpeg username@xxxxxx:/Users/username/Desktop/**
This command above is for downloading file from remote to local when you are logging into ssh, Just change the two path when you want to upload file .