简体   繁体   中英

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!

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.

sudo service ssh restart ->not work

这将行不通,请改用此选项。

sudo service sshd restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM