1

I'm trying to use google cloud to make my own SFTP server, the problem is I don't know how to properly use the ssh keys, everytime I try to connect with a ssh key the VM rejects it, any help?

I'm using PuTTYgen to generate keys and WinSCP to upload files on Windows clients, my VM is an Ubuntu server 14.04

Thank you all and sorry for my english.

closed as off-topic by EEAA Dec 6 '16 at 1:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

0

In order to be able to use OpenSSH, you need to copy your public key to your ubuntu's /home/<user name>/.ssh/authorized_keys file, enable pubkey authentication in your ssh server and afterwards you can use your private key with putty for login.

  • My key is already in this file, (added by google) and the authentication is on but still i'm not able to connect to the server by sftp – Mateo Guty Dec 6 '16 at 14:14
  • What does the log say? – dim-0 Dec 6 '16 at 14:16
  • Dec 6 14:12:58 prueba sshd[23169]: Authentication refused: bad ownership or modes for directory /home/sftp/porton Dec 6 14:12:58 prueba sshd[23169]: error: Received disconnect from 190.251.68.42: 14: No supported authentication methods available [preauth] – Mateo Guty Dec 6 '16 at 14:18
  • I think I have the answer the home folder of this user was made using root, should I change the ownership? – Mateo Guty Dec 6 '16 at 14:19
  • Yes. Use sudo chown -R <user>:<group> /home/sftp/porton/ to accomplish that. – dim-0 Dec 6 '16 at 14:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.