最近我的新项目友链联盟youlianplus.com项目即将完成,准备拿到阿里云试试,在阿里云华北3购买了一台迷你服务器,1核1g40g硬盘,打算测试一下。
买了之后,准备用ssh登录进去,结果出现了个permission denied
权限被拒绝的问题,详情如下:
chengmingdeMacBook-Pro:blog cmlanche$ ssh root@47.92.24.241
The authenticity of host '47.92.24.241 (47.92.24.241)' can't be established.
ECDSA key fingerprint is SHA256:PYBgUIuFIYcBUCzUGG0qLJDGH2At/dQ+zk+Q9tyX7+E.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '47.92.24.241' (ECDSA) to the list of known hosts.
Permission denied (publickey).
chengmingdeMacBook-Pro:blog cmlanche$ ssh root@47.92.24.241
Permission denied (publickey).
chengmingdeMacBook-Pro:blog cmlanche$ ssh root@47.92.24.241
Permission denied (publickey).
意思是说,无法用publickey来登录服务器,那问题肯定出在服务器那边的配置上了,百度找了个解决办法,有效!https://blog.csdn.net/wtopps/article/details/79449920
幸好阿里云控制台界面有一个远程连接的控制,通过这个入口进去,可以直接登录。
进去后,注意要保存好连接码,这个码只会出现一次!就保存在你电脑中就好了。
关键步骤:
vi /etc/ssh/sshd_config
修改PasswordAuthentication的值为yes,注意把签名的#去掉
PasswordAuthentication yes
上文连接说要重启httpd服务,其实没啥作用,咱们来硬的,直接重启服务器就好了!