-1

I created an EC2 instance with CentOS 7. I logged in from putty using the username 'centos'. Once I logged I can change user to root. I installed CWP and from the CWP I created a user account, Consider 'userme' with password 'xxxx'. When I run ls command inside /home I can see 'userme'. Now how can I login to userme from WinSCP to upload and download files. I tried logging in with .ppk file, but no use

6
  • Can you login with PuTTY using "userme"? Sep 16, 2017 at 10:33
  • It says Server refused key @MartinPrikryl Sep 16, 2017 at 11:13
  • So why do you limit your question to WinSCP, when you actually cannot connect with SSH at all? Sep 17, 2017 at 4:53
  • Because from PuTTY, If I loggin as centos, I can change user and goto any directory, but can't download and upload files, so I highlighted WinSCP Sep 17, 2017 at 10:56
  • Ok, but that's irrelevant to the root problem. Sep 17, 2017 at 14:51

1 Answer 1

0

My understanding is that "userme" has only a password and not yet a key associated with it.

  1. In the case you are trying to ssh (or WinSCP) using the password, you need to make sure you are allowing your users to authenticate with passwords.

    You need to to go to /etc/ssh/sshd_config and make sure "PasswordAuthentication yes" is set.

    Restart ssh service: service ssh restart

    This way you will be able to ssh with the password.

  2. In case you want to ssh using the key, you need to associate a key to "userme":

    Add your public key to "/home/userme/.ssh/authorized_keys"

And you should be good to go.

1
  • I wanted the second option, it worked like a charm, Thanks Sep 20, 2017 at 5:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .