is there something wrong with this scp command ?
scp -C -i ./remoteServerKey.ppk -r /var/www/* [email protected]:/var/www
I use the same .ppk as in putty and enter the same passphrase, but it asks me 3 times and than says connection denied. I thought I used it before and it worked, but it isnĀ“t atm. If it is wrong, how should I do it ?
This question is related to
linux
ssh
copy
file-transfer
scp
Covert .ppk to id_rsa using tool PuttyGen, (http://mydailyfindingsit.blogspot.in/2015/08/create-keys-for-your-linux-machine.html) and
scp -C -i ./id_rsa -r /var/www/* [email protected]:/var/www
it should work !
or you can also do ( for pem file )
scp -r -i file.pem [email protected]:/home/backup /home/user/Desktop/
The command looks quite fine. Could you try to run -v (verbose mode) and then we can figure out what it is wrong on the authentication?
Also as mention in the other answer, maybe could be this issue - that you need to convert the keys (answered already here): How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) OR http://winscp.net/eng/docs/ui_puttygen (depending what you need)
Source: Stackoverflow.com