[Linux] Upload and Download via SSH terminal

I. Abstract

Sometimes we experience the situation we need to upload or download something and there is no ftp installed yet. The following article provides information about uploading (push’ing) or downloading (pull’ing) via SSH using the terminal only.

II. Push commands (Upload to server)

  • client$ ssh remote_address cat <localfile ">" remote_file
  • client$ ssh remote_address cat <localfile - ">" remote_file
  • client$ ssh remote_address cat <local_file "|" dd of=remote_file
  • client$ ssh remote_address cat - <local_file "|" dd of=remote_file
  • client$ cat local_file | ssh remote_address cat ">" remote_file
  • client$ cat local_file | ssh remote_address cat - ">" remote_file
  • client$ dd if=local_file | ssh remote_address dd of=remote_file

III. Pull commands (Download from server)

  • client$ ssh remote_address cat remote_file > local_file
  • client$ ssh remote_address cat "<" remote_file >local_file
  • client$ ssh remote_address dd if=remote_file | dd of=local_file

If that helped you well, consider clicking our sponsor (non offensive Google Adsense) to help maintaining this project free for all of you…

IV. Final words
We hope we could be of service and those commands helped you a bit. In case you found what you were looking for, you may consider our sponsors. They really got the coolest offers and allow us to run this site. Thanks.

You can leave a response, or trackback from your own site.

3 Responses to “[Linux] Upload and Download via SSH terminal”

  1. flox says:

    scp does the same, no?

  2. [...] untuk upload file ke komputer lain melalui ssh dapat dengan menggunakan perintah ini :scp /lokasi/file/lokal user-remote@ip_atau_alamat_remote:/lokasi/target/file atau scp -r /lokasi/direktori user-remote@ip_atau_alamat_remote:/lokasi/target/direktori untuk meng-upload direktori. atau untuk host linux dapat dengan menggunakan varian berikut ini: ssh user@remote_address cat < localfile “>” remote_file ssh user@remote_address cat < localfile – “>” remote_file ssh user@remote_address cat < local_file “|” dd of=remote_file ssh user@remote_address cat – < local_file “|” dd of=remote_file cat local_file | ssh user@remote_address cat “>” remote_file cat local_file | ssh user@remote_address cat – “>” remote_file dd if=local_file | ssh user@remote_address dd of=remote_file Untuk Download dapat menggunakan kombinasi perintah berikut ini: ssh user@remote_address cat remote_file > local_file ssh user@remote_address cat “local_file ssh user@remote_address dd if=remote_file | dd of=local_file referensi:http://bbs.archlinux.org/viewtopic.php?id=58763 http://www.helpdesk.umd.edu/documents/4/4801/ http://news.metaparadigma.de/linux-upload-and-download-via-ssh-terminal-226/ [...]

  3. [...] to trying to upload a file from my laptop to that server using the commands guided in this website: http://news.metaparadigma.de/linux-upload-and-download-via-ssh-terminal-226/. Seems like it only works for Linux to Linux machine. It didn’t recognize the Windows path [...]

Leave a Reply