|
通过ssh上传文件的利好工具,可以和putty合用.
Winscp 简明使用指南
WinSCP是一个Windows环境下使用SSH的开源图形化SFTP客户端。同时支持SCP协议。它的主要功能就是在本地与远程计算机间安全的复制文件。
官文下载地址:http://winscp.net/eng/download.php
特性:
图形用户界面
多语言
与Windows完美集成(拖拽, URL, 快捷方式)
支持所有常用文件操作
支持基于SSH-1、SSH-2的SFTP和SCP协议
支持批处理脚本和命令行方式
多种半自动、自动的目录同步方式
内置文本编辑器
支持SSH密码、键盘交互、公钥和Kerberos(GSS) 验证
通过与Pageant(PuTTY Agent)集成支持各种类型公钥验证
提供Windows Explorer与Norton Commander界面
可选地存储会话信息
可将配置文件存于注册表,适合在移动介质上操作
实例教学:
C:\Documents and Settings\wlf>winscp3 192.168.1.169 //连接到主机192.168.1.169
或是
C:\Documents and Settings\wlf>winscp3 //开启winscp
winscp>open 192.168.1.169 //连接主机192.168.1.169
User name:輸入用戶名 //输入登录帐号
Initialisation...
Searching for host...
Connecting to host...
Authenticating...
Using username "root".
'[email protected]' session password:輸入password //输入密码
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] [email protected] //该处提示登錄成功
winscp> lcd e:\cvs\mis\shlinux\www\void_doc //設置本地路徑
e:\cvs\mis\shlinux\www\void_doc
winscp> lls //列出本地路徑下的所有文件
2006/09/04 下午 12:06 <DIR> ..
2006/09/14 下午 04:29 2,479 void_doc.php
2006/09/15 上午 11:30 1,551 config.inc.php
2006/11/07 下午 01:08 4,126 function.inc.php
2006/11/02 下午 02:21 3,539 do_void_doc.php
2006/09/08 下午 12:58 275 cls_priv.php
2006/10/30 上午 09:40 <DIR> CVS
2006/11/07 下午 03:43 5,440 need_void.php
2006/11/08 下午 03:06 4,069 do_void_batch.php
2006/11/08 下午 03:50 5,404 batchdo.php
winscp>cd /var/www/html/www/void_doc //进入远端主機目標目錄
/var/www/html/www/void_doc
winscp>
winscp> put batchdo.php //上傳文件
batchdo.php | 5 kB | 6.7 kB/s | ascii | 100%
winscp>
winscp>exit //离开
命令列表:
winscp> help //输入help获得详细帮助信息
call Executes arbitrary remote shell command
cd Changes remote working directory
chmod Changes permissions of remote file
close Closes session
exit Closes all sessions and terminates the program
get Downloads file from remote directory to local directory
help Displays help
keepuptodate Continuously reflects changes in local directory on remote one
lcd Changes local working directory
lls Lists the contents of local directory
ln Creates remote symbolic link
lpwd Prints local working directory
ls Lists the contents of remote directory
mkdir Creates remote directory
mv Moves or renames remote file
open Connects to server
option Sets or shows value of script options
put Uploads file from local directory to remote directory
pwd Prints remote working directory
rm Removes remote file
rmdir Removes remote directory
session Lists connected sessions or selects active session
synchronize Synchronizes remote directory with local one
winscp>
因winscp本身还提供gui界面的程式,使用比较简便,此不赘述. |
|