copy file from romote linux machine to windows local machine

up vote 9 down vote accepted

Use the PSCP tool from the putty download page:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

PSCP is the putty version of scp which is a cp (copy) over ssh command.

PSCP needs to be installed on your windows computer (just downloaded, really, there's no install process). Nothing needs to be installed on the school's servers. PSCP and scp both use ssh to connect.

To answer the usage question from the comments:

To upload from your computer to a remote server:

c:\pscp c:\some\path\to\a\file.txt user@remote:\home\user\some\path

This will up load the file file.txt to the specified directory on the server. If the final part of the destination path is NOT a directory, it will be the new file name. You could also do this to upload the file with a different name:

c:\pscp c:\some\path\to\a\file.txt user@remote:\home\user\some\path\newname.txt

To download a file from a remote server to your computer:

c:\pscp user@remote:\home\user\some\file.txt c:\some\path\to\a\

or

c:\pscp user@remote:\home\user\some\file.txt c:\some\path\to\a\newfile.txt

or

c:\pscp user@remote:\home\user\some\file.txt .

With a lone dot at the end there. This will download the specified file to the current directory.

Since the comment is too far down, I should also point out here that WinSCP exists providing a GUI for all this, if that's of interest: http://winscp.net/eng/download.php

e.g. in cmd in windows

c:\>c:\software\pscp.exe xxxx@xxxx:/home/xxx/xxx/xxx.x c:\xxx\xxx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值