How to download a file from my server using SSH (using PuTTY on Windows)

前端 未结 6 2022
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 18:41

When I try downloading a file from my server onto my computer, it actually downloads the file onto the server.

(Note I am already SSH\'d into my server before typing

6条回答
  •  一整个雨季
    2020-12-04 19:24

    If your server have a http service you can compress your directory and download the compressed file.

    Compress:

    tar -zcvf archive-name.tar.gz -C directory-name .
    

    Download throught your browser:

    http://the-server-ip/archive-name.tar.gz

    If you don't have direct access to the server ip, do a ssh tunnel throught putty, and forward the 80 port in some local port, and you can download the file.

提交回复
热议问题