From 6174e1ceab5a4f23a913597370b298992322d4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B2=9B=E5=A4=AA?= <1932644427@qq.com> Date: Thu, 16 May 2024 12:12:46 +0800 Subject: [PATCH] 20240515 --- "20240515Debian\345\256\211\350\243\205.md" | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 "20240515Debian\345\256\211\350\243\205.md" diff --git "a/20240515Debian\345\256\211\350\243\205.md" "b/20240515Debian\345\256\211\350\243\205.md" new file mode 100644 index 0000000..6393cdf --- /dev/null +++ "b/20240515Debian\345\256\211\350\243\205.md" @@ -0,0 +1,50 @@ +## Linux + +- 安装Debian + + - 下载ISO镜像 + - https://www.debian.org/ + - 安装虚拟机 + - VMware Workstation Pro + +- 使用ssh远程连接Debian + + - ```sh + 1.如果没有ssh服务端,需要先安装 + apt-get install ssh -y //普通用户没有权限,需要使用root权限 + + 2.查看ip地址 + ip add show + ifconfig //如果命令未找到,需要安装 net-tools + apt-get install net-tools -y + 3.安装vim编辑器 + apt-get install vim -y + + 4.修改ssh的服务端配置文件 + vim /etc/ssh/sshd_config + Port 22// 开启端口22 + PermitRootLogin yes // 允许root登录 + PasswordAuthentication yes // 采用密码验证模式 + PermitEmptyPasswords no // 禁用空密码 + 重启ssh,配置生效 + systemctl restart ssh + /etc/init.d/ssh restart + + 5.如何借用root权限 + 安装sudo + apt-get install sudo -y + vim /etc/sudoers + ## + ## Allow root to run any commands anywhere + root ALL=(ALL) ALL + 用户名 ALL=(ALL) ALL + + 或 + + 加入sudo用户组 + usermod -aG sudo 要加入的用户名 //加入sudo用户组 + usermod -a -G dialout 要加入的用户名 //加入dialout用户组 使用串口更方便 + + 需要重新登录普通用户 + ``` + -- Gitee