Mac下SFTP連線伺服器下載檔案
阿新 • • 發佈:2018-11-17
Mac下SFTP連線伺服器下載檔案
由於工作上遇到了關於連線sftp伺服器的問題,故記錄下來
2018-08-08 HZ
-
連線伺服器
sftp /*[email protected]/*host
-
系統會提示你
The authenticity of host 'host (xx.xxx.xx.xx)' can't be established. ECDSA key fingerprint is SHA256:xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxx. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'host,xx.xxx.xx.xx' (ECDSA) to the list of known hosts.
-
輸入密碼
Connected to host. sftp>
-
pwd(獲取當前目錄資料夾)
-
cd至檔案所在目錄資料夾
-
利用get命令去下載檔案至當前目錄下(cmd開啟的目錄)
stfp> get xxx.file Fetching /xxx/xx/xxx.file to xxx.file /xxx/xxx/xxx.file 100% 90MB 9.0MB/s 00:10
到這裡你就下載成功了
-
上傳目錄檔案
stfp> put xxx/xxx.file
最後貼一些linux常用命令
pwd: Print working directory of remote host lpwd: Print working directory of local client cd: Change directory on the remote host lcd: Change directory on the local client ls: List director on the remote host lls: List directory on the local client mkdir: Make directory on remote host lmkdir: Make directory on local client get: Receive file from remote host to local client put: Send file from local client to remote host help: Display help text
喜歡就點個贊吧:D