无法以root身份通过SSH进入EC2服务器-请以"ubuntu"用户身份登录而不是用户的"root"用户身份 [英] Can't SSH as root into EC2 server - Please login as the user "ubuntu" rather than the user "root"

查看:125
本文介绍了无法以root身份通过SSH进入EC2服务器-请以"ubuntu"用户身份登录而不是用户的"root"用户身份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过WinSCP SSH进入服务器,尽管腻子也会出现问题.

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

我有Ubuntu 12.04,我已经编辑了/etc/ssh/sshd_config并将PermitRootLogin without-password添加到了文件的底部.但这似乎并没有改变我的问题.

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.

人们提到需要重启ssh恶魔.我已经尝试过:

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.

然后我尝试了Files ¬ Custom Commands ¬ sudo -s & su那里也没有运气.

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

推荐答案

http://alestic.com/2009/04/ubuntu-ec2-sudo-ssh-rsync 描述了您可以使用的所有选项,并包括使SSH能够在EC2上root的说明:

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/'

这篇关于无法以root身份通过SSH进入EC2服务器-请以"ubuntu"用户身份登录而不是用户的"root"用户身份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆