24

I am trying to SSH into my server via WinSCP, although the problem will occur with putty as well.

I have Ubuntu 12.04 I have edited /etc/ssh/sshd_config and added PermitRootLogin without-password to the bottom of the file. But this still doesn't seem to have changed my problem.

People have mentioned needed to restart ssh demon. I have tried:

 /etc/init.d/sshd reload
 reload sshd.service
 /etc/init.d/sshd reload

All of the above are unrecognised.

I have then tried Files ¬ Custom Commands ¬ sudo -s & su No luck there either.

4

1 回答 1

60

http://alestic.com/2009/04/ubuntu-ec2-sudo-ssh-rsync describes all the options available to you, and includes instructions for enabling SSH to root on EC2:

ssh -i KEYPAIR.pem ubuntu@HOSTNAME   'sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'
于 2013-03-30T20:06:23.973 回答