nohup sshpass -p your_password sftp -oBatchMode=no -b tmp.sftp username@machine &

其中tmp.sftp的内容是

get file_name
bye