Specify a private key file for transfers.
Section: scp Basics
Use a specific key with scp
bash
bash
scp -i ~/.ssh/id_ed25519 ./file.txt user@example.com:/tmp/Explanation
Specify a private key file for transfers.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing scp Basics