私は一度にセッション全体を実行したかったのでlftp -c
(後でスクリプトを介して起動するので)成功しましたが、-e
しばしば望ましくない対話型セッションが残りました。
手動状態
-c commands
Execute the given commands and exit. Commands can be separated with a semicolon, `&&'
or `||'. Remember to quote the commands argument properly in the shell. This option
must be used alone without other arguments.
ただし、コマンド/相互作用を正しく引用して接続する方法は理解できません。
lftp -e "put -O remote/dir/ /local/file.txt" -u user,pass ftpsite.com
良い結果。しかし、コマンドを実行した後に終了したいと思います。
lftp -c "open -u user,pass ftpsite.com" || put -O "remote/dir/ /local/file.txt"
ちょうど私に叫んだり、実際に私が試した引用の組み合わせ(||
または&&
何でも)
ベストアンサー1
$ lftp -c "open -u user,pass ftpsite.com; put -O remote/dir/ /local/file.txt"
それは行わなければなりません。
それでも問題が解決しない場合は、/etc/lftp.conf
次の行を追加してみてください。
set ftp:ssl-protect-data true
set ftp:ssl-force true
set ftp:ssl-auth TLS
set ssl:verify-certificate no