Ubuntu – SCP not working with a .ppk key

scpssh

so I need to connect to a remote server. Remote server is running Debian, I am on Ubuntu Lucid — and a noob in SSH.

I need a public key to connect to the remote server. The key has been created as a PuTTY Pageant File (.ppk). I used putty-tools to convert the .ppk key to Linux files (namely, id_rsa and id_rsa.pub). SSH works okay, but when I try to SCP a file terminal says :

# scp -P 52 /path/to/local/file user@host.com:/path/to/remote/file

Permission denied (publickey).
lost connection

Also, it's not working using SFTP with FileZilla:

Command:    Trust new Hostkey: Once
Error:  Could not connect to server

How come it's working with SSH and not SCP? Thanks!

Edit: it's working now! Not really sure why… How is that passphrase system working with SSH? Does it keep the passphrase in th terminal's memory? This time I've connected to SSH in one terminal tab. I was prompted my passphrase, entered it and got in. Then on another terminal tab, I tried to scp a file and I've been asked the passphrase and it worked!….

Best Answer

Is id_rsa in ~/.ssh? This is where ssh and scp looks for the private keys.

Also if your using a private key you shouldn't be prompted for a password, this would suggests that it is not being used, and also that it is not required.

I'm also confused as to why your using putty if both systems are Linux.