How can i SCP to my private server that is saved with a ssh key


I want to copy a artifact to my private server via scp. But the problem is: My private Server is saved with a public/private key. So how Can i connect to my Server?


Step 1: Open the settings of your project
Step 2: Go to "SSH Permissions"
Step 3: Go on "Add SSH Key"
Step 4: Give it a name (for example: myserver)
Step 5: Paste the raw private key (the file normally named “id_rsa”)
Step 6: Submit with "Add SSH Key"
Step 7: Go to your circle.yml
Step 8: Paste the following command (replace filename with yours): sudo scp -i ~/.ssh/id_myserver localfile.txt user@domain.tld:/custom/path/output.txt