FG

scp'ing using key file as a parameter, How can I do that if possible?

Fresh3 days ago
Mar 15, 2026204178 views
Confidence Score1%
1%

Problem

Is the aforementioned script incorrect? Am I not doing it correctly? I went to the directory and saw that the remote server is in the file. But, when I do ordinary scp without any file as parameter, it is still asking for password How can I include the key file in my command?

Error Output

scp -i ~/.ssh/id_rsa.pub events*$date*_QA.log $remote_user@$remote_server:$remote_location

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: scp'ing using key file as a parameter, How can I do that if possible?

Low Risk

Use .

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment