Linux 下用 SSH 命令登录远程服务器后,怎么样把远程服务器的文件传到本地电脑

scp username@host:/path/to/remote/source /path/to/local/destscp /path/to/local/source username@host:/path/to/remote/dest
■网友
rz/sz分别是上传与下载命令先安装这个包lrzsz
■网友
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 " between local and remote:
0.
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/xxxTo achieve the same intention when you are logging in the SSH, you must first set “System Preferences\u0026gt;sharing\u0026gt;remote log in\u0026gt;all users( I am not sure if or not you must set for "all users", but it works in this situation)”. Then 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/ 【Linux 下用 SSH 命令登录远程服务器后,怎么样把远程服务器的文件传到本地电脑】 This command above is for downloading file from remote to local when you are logging into ssh, Just exchange the two path when you want to upload file .

■网友
如果是用secureCRT登录,右击标签选择Sftp,发现会比较方便以上是在win下题猪是说在linux下 那就是scp了


    推荐阅读