LoveUnix » 编程开发 & Rational » 文件传输
让LU留住您的每

一天 让LU博客留住您的每一天
2006-6-21 16:47 秋好
文件传输

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

2006-7-13 13:55 jxppp
man 来的
[code]
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).
[/code]
So.SSH打通应该就可以了.

页: [1]
查看完整版本: 文件传输


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.