mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 05:52:52 +08:00
update 4.PVE制作虚拟机模板.md.
This commit is contained in:
@@ -220,3 +220,39 @@ Successfully imported disk as 'unused0:local-lvm:vm-1000-disk-1'
|
||||
`Cloud-Init` 的 `IP配置` 方法,如下图所示:
|
||||
|
||||

|
||||
|
||||
## 5.配置Debian系统
|
||||
|
||||
此时可以将 Debian 虚拟机开机,并使用 `Cloud-Init` 中设置的账号密码进行登录。
|
||||
|
||||
## 5.1.启用SSH密码登录
|
||||
|
||||
因为 Debian 的云镜像默认使用秘钥登录,因此切换到左侧菜单的 `控制台` 进行操作:
|
||||
|
||||

|
||||
|
||||
在 Debian 服务器的命令行界面,打开 SSH 服务的密码登录功能:
|
||||
|
||||
```bash
|
||||
## 编辑 ssh 配置文件
|
||||
sudo nano /etc/ssh/sshd_config.d/fox_sshd.conf
|
||||
```
|
||||
|
||||
在 `nano` 编辑器对话框中输入以下内容:
|
||||
|
||||
```bash
|
||||
PasswordAuthentication yes
|
||||
|
||||
PermitEmptyPasswords no
|
||||
```
|
||||
|
||||
按下键盘 `ctrl 和 x` 组合键,再按下 `Y` 键,即可保存。
|
||||
|
||||
然后,重启 SSH 服务:
|
||||
|
||||
```bash
|
||||
## 重启 sshd
|
||||
sudo systemctl restart sshd
|
||||
```
|
||||
|
||||
就可以像往常一样,通过 SSH 工具远程访问 Debian 服务器了。
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Reference in New Issue
Block a user