简体   繁体   English

使用 scp 将远程文件从 Linux 复制到本地服务器

[英]Copying a remote file from Linux to a local server using scp

So, I'm attempting to simply transfer a unix file (demo) from a server to my local computer via ssh and scp.所以,我试图通过 ssh 和 scp 将一个 unix 文件(演示)从服务器传输到我的本地计算机。 In Putty, I'm using the command as follows:在 Putty 中,我使用如下命令:

scp hasanjee@cs.utm.utoronto.ca:~/A1/demo \desktop

this works and even downloads:这有效,甚至下载:

demo                                                                                                                              100% 4096   885.9KB/s   00:00

I've tried multiple directories:我尝试了多个目录:

scp hasanjee@cs.utm.utoronto.ca:~/A1/demo \desktop\demo

What am I missing here?我在这里想念什么? Any ideas?有任何想法吗? I am using Windows 10我正在使用 Windows 10

maybe try adding a full path...也许尝试添加完整路径...

scp -P 22 hasanjee@cs.utm.utoronto.ca:~/A1/demo/somefile C:\Users\{username}\Desktop\

-p: portnumber -p:端口号

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用SCP将文件从本地复制到远程时被拒绝 - Getting PERMISSION DENIED while copying a file from local to remote using SCP scp文件到本地远程服务器中的不同用户 - scp file to different user in the remote server from local 使用Java使用Windows和Linux将本地文件复制并执行到远程服务器 - Copying and executing local files to a remote server with windows and linux using java 使用scp从远程服务器下载文件。 但是返回错误 - Downloading file using scp from a remote server. But returning error 我该如何计划一个脚本,使用CRON和SCP每小时使用时间戳将文件从远程服务器复制到本地计算机? - How can I schedule a script to copy a file from a remote server to my local machine every hour with a time stamp using CRON & SCP? 从本地到 Heroku 服务器的 SCP 文件 - SCP File from local to Heroku Server SCP从远程服务器到另一台远程服务器 - SCP from remote server to another remote server 使用SCP命令将文件从Linux服务器下载到客户端服务器 - Using SCP command to download files from Linux server to client server SCP:如何使用过滤器从远程服务器复制文件 - scp: how to copy a file from remote server with a filter SCP与paramiko,使用不同的远程和本地目录 - SCP with paramiko, using different remote and local directories
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM