This content originally appeared on flaviocopes.com and was authored by flaviocopes.com
I’ve had the need to transfer a file I had on a server.
I was connected through SSH and I didn’t want to setup the SFTP connection (and I didn’t know if the SFTP connection was allowed), so I used another terminal command: scp
.
Here’s the syntax:
scp -i /.ssh/yourkey USER@SERVER:/path-to-file/on/server.txt ./
Swap USER and SERVER with your server details, and also /path-to-file/on/server.txt
with the path of the file. And use your SSH key path.
This will download the file in the same folder you are in, because I specified ./
. You can change it to any folder on your computer.
This content originally appeared on flaviocopes.com and was authored by flaviocopes.com
flaviocopes.com | Sciencx (2021-11-07T05:00:00+00:00) How to download a file from a server using SSH. Retrieved from https://www.scien.cx/2021/11/07/how-to-download-a-file-from-a-server-using-ssh/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.