在Ubuntu系統中,使用SFTP下載大文件可參考以下方法:
sudo apt install openssh-server
安裝OpenSSH服務器,確保SFTP服務可用。然后使用ssh-keygen -t rsa -b 4096
生成SSH密鑰對,并通過ssh-copy-id username@remote_host
將公鑰復制到目標服務器,實現免密登錄。連接服務器后,用get /remote/path/largefile.zip /path/to/local/directory/
命令下載大文件。若文件過大,可考慮分塊傳輸,或使用rsync -avz --progress username@remote_host:/remote/path/largefile.zip /path/to/local/
命令進行斷點續傳。