标题: [疑问] 文件传输
秋好
LU新生
Rank: 1



UID 2677
精华 0
积分 6
帖子 11
活跃指数 3
LU金币 2014 个
LU金条 0 个
阅读权限 10
注册 2003-11-18
 
发表于 2006-6-21 16:47  资料  个人空间  短消息  加为好友 
文件传输

我想编写一个小程序用来在两台服务器之间定时(sftp)使用传输文件。
system ("sftp xxx")
可是我怎么能够让程序自动读入密码进行连接了?
清高手指点。

顶部
jxppp
LU幼天使
Rank: 2


LU爱心使者  
UID 21356
精华 0
积分 154
帖子 297
活跃指数 3
LU金币 53 个
LU金条 5441 个
阅读权限 20
注册 2004-5-21
 
发表于 2006-7-13 13:55  资料  个人空间  短消息  加为好友 
man 来的

The final usage format allows for automated sessions using the -b option.
     In such cases, it is usually necessary to configure public key authenti-
     cation to obviate the need to enter a password at connection time (see
     sshd(8) and ssh-keygen(1) for details).

So.SSH打通应该就可以了.

顶部
 



当前时区 GMT+8, 现在时间是 2008-12-5 11:07
乐悠LoveUnix论坛-京ICP备05005823号

Thanks to Discuz!  © 2001-2007    Power by LoveUnix.net
Processed in 0.052286 second(s), 6 queries , Gzip enabled

清除 Cookies - 联系我们 - 乐悠LoveUnix - Archiver