日期:2014-05-16  浏览次数:20848 次

openssh sftp的使用
我下一个openssh的一份代码,编译通过,但是在使用openssh中sftp客户端时直接输入./sftp 会显示如下信息
usage: sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
[-o ssh_option] [-P port] [-R num_requests] [-S program]
[-s subsystem | sftp_server] host
sftp [user@]host[:file ...]
sftp [user@]host[:dir[/]]
sftp -b batchfile [user@]host

然后我输入./sftp user@192.168.6.6然后程序打印:
command-line: line 0: Bad configuration option: PermitLocalCommand
Couldn't read packet: Connection reset by peer

真不明白上面是什么意思。linux自带的sftp使用sftp user@192.168.6.6提示需要输入密码。不知道openssh中的sftp为什么有问题。请高手帮忙看看sftp的启动参数是否正确.

------解决方案--------------------
直接使用
yum install sshd
yum install ssh
安装看看