I am trying to configure an ubuntu vps. I have set up ssh secure login using rsa public and private keys from a local machine.
As well as disabling root login I have also set up iptables and configured to allow ports 80 and 22 (port 22 only from my ip address) for the ssh tunnel.
I can connect fine using ssh but when I try using scp from my local machine
sudo scp /var/www/filetocopy user@remoteaddress:/var/www/filetocopy
I get this error
Permission denied (publickey).
Does this mean that I have to generate another public key/private key pair or is there a way of using the key that the ssh uses?
many thanks in advance