Search code examples
linuxubuntuamazon-ec2plesk

Unable to ssh with user created under Plesk (Amazon Ec2)


I've manually installed Plesk under ubuntu instance (EC2), and created a system user using Plesk, so When I try to SSH with that user I get: Permission denied (publickey). I have a pem key that I use to ssh with ubuntu user.

My main goal is to have a git clone from bitbucket, And I understood that the right user should do the cloning so it'll succeed. I've tried with many methods and looked everywhere!

Any help will be much appreciated. Thank you!


Solution

  • Okay so I found the solution.

    First I had to login as the main user (for me it was ubuntu) using the pem key provided with Amazon.

    Then I had modify this file: sudo nano /etc/ssh/sshd_config and changed PasswordAuthentication no to PasswordAuthentication yes

    Then I had to restart the ssh service: sudo service ssh restart

    And that was the end of it!

    PS when I was logged in with Plesk user, I had to activate ssh-agent like so: ssh-agent /bin/bash

    I hope this helps anyone.