linux与linux,linux与windows,windows与linux之间SSH文件传输

linux与linux之间传送文件:


scp filename username@ip:filename

例:

> scp appc [email protected]:/home/daniel
Password:
appc                                        100% 7556KB   7.4MB/s   00:00

windows与linux之间传送文件:


用 putty的内置pscp.exe。先启动windows的命令提示符界面,cd到PUTTY目录下及pscp文件所在目录。

pscp filename  username@ip:filename
例:

D:\>pscp AuthFile [email protected]:/home/daniel/
Using keyboard-interactive authentication.
Password:
AuthFile                  | 0 kB |   0.3 kB/s | ETA: 00:00:00 | 100%

linux到windows之间传送文件:


pscp username@ip:filename filename

例:

D:\Temp>pscp [email protected]:/home/daniel/AuthFile d:/Temp/
Using keyboard-interactive authentication.
Password:
AuthFile                  | 0 kB |   0.3 kB/s | ETA: 00:00:00 | 100%


windows下使用psftp与Linux之间传送文件:


用putty的内置psftp.exe。先启动windows的命令提示符界面,cd到PUTTY目录下及psftp文件所在目录。

首先,在windows 下运行命令提示符界面,psftp.exe ,登录后改变在linux下的目录: 

cd  /usr/ 

然后,改变在windows下上传和下载的目录:  
lcd  d:/  

最后就是使用psftp中命令进行文件的上下载:
>psftp
psftp: no hostname specified; use "open host.name" to connect
psftp> open 10.141.44.203
login as: daniel
Using keyboard-interactive authentication.
Password:
Remote working directory is /home/daniel
psftp> pwd
Remote directory is /home/daniel
psftp> cd test
Remote directory is now /home/daniel/test
psftp> ls
Listing directory /home/daniel/test
drwxr-xr-x   10 daniel users        4096 Jan  9 19:36 .
drwxr-xr-x   26 daniel users        4096 Jan 11 15:02 ..
-rwxr--r--    1 daniel users       10417 Jan  9 11:29 test.bin
psftp> lcd d:
New local directory is D:\
psftp> get test.bin
remote:/home/daniel/test/test.bin => local:test.bin
psftp> exit


参考资料:PuTTY Download Page



你可能感兴趣的:(linux,windows,ssh,download,login)