I am trying to setup scp on a new Ubuntu 14.04 system. This system will act as an SSH client to an already configured SSH server on another Ubuntu 14.04 system. I can use putty to SSH into the existing SSH server instance but I am having trouble configuring the new client system with the private key. I am the only user of these systems so I am using the existing private key since it corresponds to the public key already on the SSH server.

On the new client system so far I have added the private key to the ~./ssh/known_hosts file and the /etc/ssh/<username>/authorized_keys file. I have also modified the sshd_config to allow RSA based authentication. When I run my scp command on the client I get this output:

The authenticity of host '192.168.17.99 (192.168.17.99)' can't be established.
ECDSA key fingerprint is 8a:cc:5b:f0:c4:ef:d7:e1:94:67:59:72:8d:a9:60:0b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.17.99' (ECDSA) to the list of known hosts.
Permission denied (publickey).
cp: cannot stat ‘user@192.168.17.109’: No such file or directory

I originally created the key pair with puttygen. I uploaded the private key file (.ppk) to the client system and used cat to merge the contents into the ~./ssh/known_hosts file which I then copied over to /etc/ssh/user/authorized_keys file. Both of these files are identical with both the public and private keys included. Here is my ssh config:

Host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no

I think the problem may be with the ECDSA. It looks like something is calling for ECDSA keys but I am using RSA based keys. Is this the problem? If so, what controls this and how do I change it? One more concern of mine is that the contents of the known_hosts and authorized_keys files appear to be in a putty specific format so I an wondering if that may also be a problem.

  • Please edit your question and include the specific commands you used to generate your keys, how you have modified sshd_config and how you added your key. – terdon Nov 15 '14 at 13:13
  • 1
    did you convert putty ppk to openssh format before merge? – rush Nov 15 '14 at 13:37
  • @rush - not formally no, I did however remove some of the putty specific headers. How would I officially convert? – user53029 Nov 15 '14 at 13:42
  • @user53029, putty key is multiline with headers. if you removed only headers it makes no sense. to convert you can use ssh-keygen -i -f /path/to/ppk/pub – rush Nov 15 '14 at 13:46
  • Getting uudecode failed – user53029 Nov 15 '14 at 13:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.