编译dropbear 放到 /usr/sbin

dropbearkey是dropbear的链接文件

编译好 sftp-server 放到 /usr/libexec目录下,因为dropbear默认编译路径在此目录下         /usr/libexec/sftp-server

同时需要 /usr/lib/libcrypto.so     -->   /usr/lib/libcrypto.so.1.0.0 库文件


以下为简单的启动脚本

//---------------------------------------------

#!/bin/sh


base=dropbear

# lftp -e "set ssl:key-file .ssh/id_rsa.mykey" sftp://my.host.com

#for ssh server

#dropbear -P /tmp/dropbear.pid


# See how we were called.

case "$1" in

 start)

               /usr/sbin/$base -P /tmp/${base}.pid

       ;;

 stop)

       pid=`/bin/pidof $base`

       if [ -n "$pid" ]; then

               kill -9 $pid

       fi

       ;;

esac


exit 0



在linux下可以使用lftp来访问, 在win下可以用免费的WinSCP, FileZilla

lftp -e "set ssl:key-file .ssh/id_rsa.mykey" sftp://my.host.fr  使用key方式


lftp -u user,xxx sftp://    使用用户名密码方式

需要更安全方式,可使用rsa key + passwd方式

SFTP client applications

WinSCP – Free windows client with SFTP, SCP and FTP capability

PSFTP (an SFTP client, i.e. general file transfer sessions much like FTP)

FileZilla Client (also referred to as FileZilla) is a free, open source, cross-platform FTP as well as SFTP client.

SFTP is a command-line program that implements the client part of SFTP, supplied with OpenSSH package.



参考文章: http://www.cnblogs.com/rooney/archive/2012/03/22/2411769.html

http://lidashuang.writings.io/articles/d56325f8