5.2.2. 允许 root 通过 SSH 登录
在 virt-v2v 安装完成后,转换服务器需要被配置来接受从 P2V client 的连接。P2V client 需要以 root 身份通过 SSH 连接到转换服务器,因此转换服务器需要允许 root 通过 SSH 登录。
允许 root 通过 SSH 登录:
- 以 root 的身份编辑 sshd_config 文件(
/etc/ssh/sshd_config
):nano /etc/ssh/sshd_config
- 在这个文件的 Authentication 数据段中添加一行
PermitRootLogin yes
。这行内容可能已经存在,如果它被注释掉(使用"#"),您只需要删除 "#"。# Authentication: #LoginGraceTime 2m PermitRootLogin yes #StrictModes yes #MaxAuthTries 6 #MaxSessions 10
- 保存修改过的
/etc/ssh/sshd_config
文件。 - 重启 SSH 服务器:
service sshd restart
现在,您将可以以 root 的身份通过 SSH 连接到转换服务器。