CentOS 7 Build KVM online admin panel webvirtmgr login with SSH authorization

Source: Internet
Author: User
Tags ssh access

Environment: CentOS 7.4

1. Create SSH private key and SSH configuration options (on systems with Webvirtmgr installed):

# Switch to Nginx user
Su-nginx-s/bin/bash
# production ssh key Ssh-keygen
#(path-to-id-rsa-in-nginx-home): ...
# Configure Permissions Touch ~echo -E "stricthostkeychecking=no\nuserknownhostsfile=/dev/null" >> ~/.ssh/  0600 ~/.ssh/config

2. Add the Webvirt user (on the Qemu-kvm/libvirt host server) and add it to the correct group:

Groupadd libvirtdadduser webvirtmgrpasswd webvirtmgrusermod-g libvirtd-a webvirtmgrusermod-g libvirtd-a Root

3. Return the Webvirtmgr host and copy the public key to the Qemu-kvm/libvirt host server (on the system where Webvirtmgr is installed):

Su-nginx-s/bin/bashsh-copy-id [email protected]-P port
# Password entry will appear here
# After successful use this command test, if you can quickly log in then the new success
SSH [email protected]-P port

4. Set permissions to manage Libvirt (on Qemu-kvm/libvirt host server):

 vi/etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access. pkla  # (remote user rights webvirtmgr) [Remotes Libvirt SSH access]identity  =unix-user:webvirtmgr   Action  =org.libvirt.unix. manageresultany  =yesresultactive  =yes 
Vi/etc/polkit-1/localauthority/50-local.d/50-org.libvirtd-group-access. Pkla# (local user group LIBVRITD permissions) [LIBVIRTD group Management access]identity=unix-group: LIBVIRTD Action=org.libvirt.unix. manageresultany=yesresultinactive=yesresultactive=yes

5. Set up user groups to start the LIBVIRTD service

Vi/etc/libvirt/libvirtd.conf

6. Add SSH login configuration in Webvirtmgr

Reference:

Https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization

CentOS 7 Build KVM online admin panel webvirtmgr login with SSH authorization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.