[pve-devel] [PATCH container 0/4] Add public ssh key setup for LXC

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Apr 5 13:16:59 CEST 2016


This patch series adds support for setting up public ssh keys
for containers.

Available via pct and API, but not the GUI for now.
Tested with Debian 8, CentOS 7, Suse 13.1 and Ubuntu 15.04.
Setup for Archlinux works, but our template does not enable
ssd by default, Fedora 22 seems to be further broken somehow.

Fabian Grünbichler (4):
  Add authorized ssh key setup to post_create_hook
  Add setup tests for authorized keys
  Add ssh key setup to create_rootfs
  Expose ssh_keys feature over API

 src/PVE/API2/LXC.pm                                | 13 ++++++++-
 src/PVE/CLI/pct.pm                                 | 10 +++++++
 src/PVE/LXC/Create.pm                              |  9 ++++---
 src/PVE/LXC/Setup.pm                               |  4 +--
 src/PVE/LXC/Setup/Base.pm                          | 31 +++++++++++++++++++++-
 src/test/run_setup_tests.pl                        | 10 +++++--
 .../test-centos6-001/root/.ssh/authorized_keys.exp |  3 +++
 .../test-debian-001/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-002/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-003/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-004/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-005/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-006/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-007/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-008/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-009/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-010/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-011/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-012/root/.ssh/authorized_keys.exp  |  3 +++
 .../test-debian-013/root/.ssh/authorized_keys.exp  |  3 +++
 src/test/test-debian-014/config                    |  1 +
 src/test/test-debian-014/etc/debian_version        |  1 +
 src/test/test-debian-014/etc/hostname.exp          |  1 +
 src/test/test-debian-014/etc/hosts.exp             |  5 ++++
 src/test/test-debian-014/etc/passwd                | 21 +++++++++++++++
 src/test/test-debian-014/etc/passwd.exp            | 21 +++++++++++++++
 src/test/test-debian-014/etc/shadow                | 21 +++++++++++++++
 src/test/test-debian-014/etc/shadow.exp            | 21 +++++++++++++++
 .../roothome/.ssh/authorized_keys.exp              |  3 +++
 .../root/.ssh/authorized_keys.exp                  |  3 +++
 .../root/.ssh/authorized_keys.exp                  |  3 +++
 .../root/.ssh/authorized_keys.exp                  |  3 +++
 32 files changed, 213 insertions(+), 10 deletions(-)
 create mode 100644 src/test/test-centos6-001/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-001/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-002/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-003/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-004/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-005/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-006/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-007/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-008/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-009/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-010/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-011/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-012/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-013/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-debian-014/config
 create mode 100644 src/test/test-debian-014/etc/debian_version
 create mode 100644 src/test/test-debian-014/etc/hostname.exp
 create mode 100644 src/test/test-debian-014/etc/hosts.exp
 create mode 100644 src/test/test-debian-014/etc/passwd
 create mode 100644 src/test/test-debian-014/etc/passwd.exp
 create mode 100644 src/test/test-debian-014/etc/shadow
 create mode 100644 src/test/test-debian-014/etc/shadow.exp
 create mode 100644 src/test/test-debian-014/roothome/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-opensuse-001/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-opensuse-002/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-opensuse-003/root/.ssh/authorized_keys.exp

-- 
2.1.4




More information about the pve-devel mailing list