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
-
Can you login with PuTTY using "userme"?– Martin PrikrylSep 16, 2017 at 10:33
-
It says Server refused key @MartinPrikryl– Lenson Roy SaldanhaSep 16, 2017 at 11:13
-
So why do you limit your question to WinSCP, when you actually cannot connect with SSH at all?– Martin PrikrylSep 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– Lenson Roy SaldanhaSep 17, 2017 at 10:56
-
Ok, but that's irrelevant to the root problem.– Martin PrikrylSep 17, 2017 at 14:51
1 Answer
My understanding is that "userme" has only a password and not yet a key associated with it.
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.
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.
-
I wanted the second option, it worked like a charm, Thanks Sep 20, 2017 at 5:31