aws ec服务器设置密码登录,ec服务器root登录 aws服务器初始化配置

  1. 首次实例化机器后,先以ec2-user登录服务器

  2. 改root密码

sudo passwd root

  1. 然后以root角色登录,修改配置:

    cd /etc/ssh

    vim /sshd_config

  2. 找到PermitRootLogin,改为下方这种,PasswordAuthentication可能没有,需要新增,

查找参数命令: /PermitRootLogin

复制代码
PermitRootLogin yes
PasswordAuthentication yes
  1. 重启sshd

    /sbin/service sshd restart

6.然后就可以密码登录了

相关推荐
niucloud-admin4 小时前
JAVA V6 多商户商城 开发文档——job 计划任务开发
java·python·github
陈陈CHENCHEN6 小时前
【Linux】服务器根目录磁盘扩容操作记录
linux·运维·服务器
沸速存储8 小时前
AI 机器人靠哪些内存与存储驱动整机运行?
服务器·科技·嵌入式硬件·电脑
峰向AI8 小时前
Notion 太贵?这个 40K Star 的开源知识库,让你零成本搭建团队 wiki
github
fengyehongWorld8 小时前
Linux squid搭建基础代理服务器
linux·运维·服务器
逛逛GitHub9 小时前
37K Star 的 GitHub 开源项目开放 AI 网关,10 人团队免费用。
github
Cx330❀10 小时前
【Linux网络】网络层 IP 协议:从网段划分到内核源码解析
大数据·linux·服务器·网络·tcp/ip·性能优化·langchain
FuckPatience11 小时前
Git:the remote end hung up unexpectedly,Everything up-to-date
github
一技安身11 小时前
【信创】docker-26.0.2.tgz 原理 + 完整安装
linux·运维·服务器
郝学胜-神的一滴12 小时前
Effective Python 条款 13:善用星号解包,告别下标切片拆分的坑
服务器·开发语言·数据结构·python·程序人生·pycharm