购买阿里云遇到Permission denied的问题
最近我的新项目友链联盟youlianplus.com项目即将完成,准备拿到阿里云试试,在阿里云华北3购买了一台迷你服务器,1核1g40g硬盘,打算测试一下。
买了之后,准备用ssh登录进去,结果出现了个permission denied
权限被拒绝的问题,详情如下:
chengmingdeMacBook-Pro:blog cmlanche$ ssh [email protected] 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 [email protected] Permission denied (publickey). chengmingdeMacBook-Pro:blog cmlanche$ ssh [email protected] Permission denied (publickey).
意思是说,无法用publickey来登录服务器,那问题肯定出在服务器那边的配置上了,百度找了个解决办法,有效!https://blog.csdn.net/wtopps/article/details/79449920
幸好阿里云控制台界面有一个远程连接的控制,通过这个入口进去,可以直接登录。
进去后,注意要保存好连接码,这个码只会出现一次!就保存在你电脑中就好了。
关键步骤:
vi /etc/ssh/sshd_config
修改PasswordAuthentication的值为yes,注意把签名的#去掉
PasswordAuthentication yes
上文连接说要重启httpd服务,其实没啥作用,咱们来硬的,直接重启服务器就好了!
相关推荐
CosEmon 2020-11-13
lihongtai 2020-11-09
sqisydream 2020-11-11
fjlmcy 2020-10-31
visionarywind 2020-10-31
特立独行 2020-10-30
Hitpoint云计算 2020-10-30
sqsfjsjlpf 2020-10-29
平凡的程序员 2020-10-15
yunna0 2020-09-23
OpenCDN网站加速 2020-09-21
82453961 2020-09-21
qual0 2020-09-21
mysteryrat 2020-09-21
Liucute 2020-09-21
古影轩 2020-09-17
aolia000 2020-09-11
罗忠浩 2020-08-16