Home » Questions » Computers [ Ask a new question ]

How to download a file from the command line? via ssh?

How to download a file from the command line? via ssh?

I want to download files from a remote server to my local drive, and do it from the command line. I also want to be able to do this over SSH. How can I do this?

Asked by: Guest | Views: 335
Total answers/comments: 2
bert [Entry]

"Use scp-command, it runs on top of SSH. Example:

scp username@remote.host:/path/to/file localfile

It also works another way round

scp localfile username@host:/path/remotefile

Username, path, and filename can be omitted (but not the : !).

As Iain said, SFTP works also, but I tend to favor scp for its cp-like usage."
bert [Entry]

I use SFTP for this. It's command line and uses the same security as SSH.