Im using codeship for deployment and it provides a way to access the build machine with ssh:
ssh rof@1.2.3.4 -p 65503
This works fine and I get into the machine. Now I want to copy a file from the remote machine to my local machine. Im trying:
sudo scp -p 65503 -v -i ~/.ssh/id_rsa rof@1.2.3.4:~/home/rof/cache/app.js /
And I get a whole host of errors:
cp: 65503: No such file or directory
cp: -v: No such file or directory
cp: -i: No such file or directory
rof@23.20.112.101: Permission denied (publickey).
I dont know why it's saying No such file or directory
for each argument.
id_rsa
exists and is in ~/.ssh/
directory.
The Permission Denied error appears to be a separate issue.
Any ideas?