How to use the 1P cli to upload files via scp

Options
chillrobot
chillrobot
Community Member
edited April 10 in CLI

I'm looking for a sample commandline invocation of *nix utility scp to upload a file (to an AWS ec2 instance I own).

The doc https://developer.1password.com/docs/ssh/agent/compatibility/#ssh-sftp-scp suggests this is possible but doesn't give or link to examples.

For example, would the sample below work if ~/.ssh/id_ed25519.pub were replaced with a secret reference?

scp -i ~/.ssh/id_ed25519.pub ~/Desktop/mySample.wav  myUserIdOnTheEc2@ec2-54-166-128-20.compute-1.amazonaws.com:~/

Note that I have checked whether the ssh agent would provide my key:

echo $SSH_AUTH_SOCK
/tmp/ssh-XXXXXXkiWrgX/agent.1380

So that suggests that my scp invocation should work. But when I try it, I get error Permission denied (publickey).


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided