KVM远程VMM管理
作业环境
服务器
server01:Red Hat Enterprise Linux Server release 6.1 (Santiago)
IP:10.8.0.124/255.255.0.0
KVM:qemu-kvm-0.12.1.2-2.113.el6.x86_64
server 02:Red Hat Enterprise Linux Server release 6.1 (Santiago)
IP:10.8.0.130/255.255.0.0
KVM:qemu-kvm-0.12.1.2-2.113.el6.x86_64
客户端
Client:Windows 7
IP:10.8.110.28/255.255.0.0
KVM管理工具:Xming 6.9
一、连接远程物理主机VMM的前提条件
1、RHEL6 下SELinux默认状态为enforcing,需将其设置为disabled
[root@server01 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@server01 ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
重启主机使设置生效,重启后,状态为:
[root@server01 ~]# sestatus
SELinux status: disabled
2、配置SSH公钥认证
a. server01使用ssh-keygen命令生成私钥和公钥,设置过程中,将密码短语置为空
[root@server01 ~]# ssh-keygen -b 1024 -t dsa
b. 将公钥上传到server02的/root目录下
[root@server01 ~]# scp .ssh/id_dsa.pub [email protected]:
c. 在server2上配置公钥,使用root登录
[root@server02 ~]# mkdir .ssh
[root@server02 ~]# chmod 700 .ssh
[root@server02 ~]# mv id_dsa.pub .ssh
[root@server02 ~]# cd .ssh
[root@server02 .ssh]# cat id_dsa.pub >> authorized_keys
[root@server02 .ssh]# chmod 600 authorized_keys
[root@server02 .ssh]# rm -rf id_dsa.pub
d. 测试连接:
[root@server01 ~]# ssh [email protected]
Last login: Sun Oct 3 06:07:13 2011 from 10.8.0.124
[root@server02 ~]# exit
logout
Connection to 10.8.0.130 closed.
显然,不用输密码就可以直接登录了。
服务器
server01:Red Hat Enterprise Linux Server release 6.1 (Santiago)
IP:10.8.0.124/255.255.0.0
KVM:qemu-kvm-0.12.1.2-2.113.el6.x86_64
server 02:Red Hat Enterprise Linux Server release 6.1 (Santiago)
IP:10.8.0.130/255.255.0.0
KVM:qemu-kvm-0.12.1.2-2.113.el6.x86_64
客户端
Client:Windows 7
IP:10.8.110.28/255.255.0.0
KVM管理工具:Xming 6.9
一、连接远程物理主机VMM的前提条件
1、RHEL6 下SELinux默认状态为enforcing,需将其设置为disabled
[root@server01 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@server01 ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
重启主机使设置生效,重启后,状态为:
[root@server01 ~]# sestatus
SELinux status: disabled
2、配置SSH公钥认证
a. server01使用ssh-keygen命令生成私钥和公钥,设置过程中,将密码短语置为空
[root@server01 ~]# ssh-keygen -b 1024 -t dsa
b. 将公钥上传到server02的/root目录下
[root@server01 ~]# scp .ssh/id_dsa.pub [email protected]:
c. 在server2上配置公钥,使用root登录
[root@server02 ~]# mkdir .ssh
[root@server02 ~]# chmod 700 .ssh
[root@server02 ~]# mv id_dsa.pub .ssh
[root@server02 ~]# cd .ssh
[root@server02 .ssh]# cat id_dsa.pub >> authorized_keys
[root@server02 .ssh]# chmod 600 authorized_keys
[root@server02 .ssh]# rm -rf id_dsa.pub
d. 测试连接:
[root@server01 ~]# ssh [email protected]
Last login: Sun Oct 3 06:07:13 2011 from 10.8.0.124
[root@server02 ~]# exit
logout
Connection to 10.8.0.130 closed.
显然,不用输密码就可以直接登录了。
相关推荐
xiaohouye 2020-08-19
chenchuang 2020-08-01
QiHsMing 2020-06-28
hnllei 2020-06-25
wys 2020-06-18
kerson 2020-06-16
LonelyTraveler 2020-05-29
sixforone 2020-05-28
missingmuch 2020-05-25
jLawrencee 2020-05-19
想个标题偏头痛 2020-05-04
liaochaowu 2020-05-03
RisenWang 2020-05-02
wintelx 2020-04-29
89284553 2020-04-10
老谢的自留地 2020-03-25
Summer的小屋 2020-02-29
wannagonna 2020-02-25
jackalwb 2020-01-29