云上贵猪的个人博客 - passwd
type: channel
link: https://www.a-hxin.cn/tag/passwd/
items: Azure VM虚拟机获取 root权限,附root SSH访问权开启方法

Azure VM虚拟机获取 root权限,附root SSH访问权开启方法
type: item
date: 2024-12-19T01:07:00+08:00
description: Azure VM 虚拟机获取 root权限,附root SSH访问权开启方法一、修改root密码切换用户：sudo su root修改 root 密码：sudo passwd root[root@CentOS-VM]# passwd root Changing password for user root. New password: Retype new password: passwd: all authentication tokens updated successfully.给root开启SSH访问 权限需修改 sshd_config,大概46行快捷键 46ggsudo vim /etc/ssh/sshd_config#LoginGraceTime 2m #PermitRootLogin no # 去掉注释改为 yes #StrictModes yes #MaxAuthTries 6 #MaxSessions 10重启 ssh服务sudo systemctl restart sshd