mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 17:44:23 +00:00
Change sshd template to work with Ubuntu 17.04
A few things have changed and this patch makes container generated for sshd work in Ubuntu Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
This commit is contained in:
parent
c0614b0c23
commit
a0430b2f97
@ -38,7 +38,6 @@ install_sshd()
|
|||||||
rootfs=$1
|
rootfs=$1
|
||||||
|
|
||||||
tree="\
|
tree="\
|
||||||
$rootfs/var/run/sshd \
|
|
||||||
$rootfs/var/empty/sshd \
|
$rootfs/var/empty/sshd \
|
||||||
$rootfs/var/lib/empty/sshd \
|
$rootfs/var/lib/empty/sshd \
|
||||||
$rootfs/etc/init.d \
|
$rootfs/etc/init.d \
|
||||||
@ -46,7 +45,7 @@ $rootfs/etc/rc.d \
|
|||||||
$rootfs/etc/ssh \
|
$rootfs/etc/ssh \
|
||||||
$rootfs/etc/sysconfig/network-scripts \
|
$rootfs/etc/sysconfig/network-scripts \
|
||||||
$rootfs/dev/shm \
|
$rootfs/dev/shm \
|
||||||
$rootfs/run/shm \
|
$rootfs/run/sshd \
|
||||||
$rootfs/proc \
|
$rootfs/proc \
|
||||||
$rootfs/sys \
|
$rootfs/sys \
|
||||||
$rootfs/bin \
|
$rootfs/bin \
|
||||||
@ -63,6 +62,11 @@ $rootfs/lib64"
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ln -s /run $rootfs/var/run
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,17 +94,13 @@ Protocol 2
|
|||||||
HostKey /etc/ssh/ssh_host_rsa_key
|
HostKey /etc/ssh/ssh_host_rsa_key
|
||||||
HostKey /etc/ssh/ssh_host_dsa_key
|
HostKey /etc/ssh/ssh_host_dsa_key
|
||||||
UsePrivilegeSeparation yes
|
UsePrivilegeSeparation yes
|
||||||
KeyRegenerationInterval 3600
|
|
||||||
ServerKeyBits 768
|
|
||||||
SyslogFacility AUTH
|
SyslogFacility AUTH
|
||||||
LogLevel INFO
|
LogLevel INFO
|
||||||
LoginGraceTime 120
|
LoginGraceTime 120
|
||||||
PermitRootLogin yes
|
PermitRootLogin yes
|
||||||
StrictModes yes
|
StrictModes yes
|
||||||
RSAAuthentication yes
|
|
||||||
PubkeyAuthentication yes
|
PubkeyAuthentication yes
|
||||||
IgnoreRhosts yes
|
IgnoreRhosts yes
|
||||||
RhostsRSAAuthentication no
|
|
||||||
HostbasedAuthentication no
|
HostbasedAuthentication no
|
||||||
PermitEmptyPasswords yes
|
PermitEmptyPasswords yes
|
||||||
ChallengeResponseAuthentication no
|
ChallengeResponseAuthentication no
|
||||||
@ -141,7 +141,7 @@ lxc.mount.entry = /lib lib none ro,bind 0 0
|
|||||||
lxc.mount.entry = /bin bin none ro,bind 0 0
|
lxc.mount.entry = /bin bin none ro,bind 0 0
|
||||||
lxc.mount.entry = /usr usr none ro,bind 0 0
|
lxc.mount.entry = /usr usr none ro,bind 0 0
|
||||||
lxc.mount.entry = /sbin sbin none ro,bind 0 0
|
lxc.mount.entry = /sbin sbin none ro,bind 0 0
|
||||||
lxc.mount.entry = tmpfs var/run/sshd tmpfs mode=0644 0 0
|
lxc.mount.entry = tmpfs run/sshd tmpfs mode=0644 0 0
|
||||||
lxc.mount.entry = @LXCTEMPLATEDIR@/lxc-sshd $init_path none ro,bind 0 0
|
lxc.mount.entry = @LXCTEMPLATEDIR@/lxc-sshd $init_path none ro,bind 0 0
|
||||||
lxc.mount.entry = /etc/init.d etc/init.d none ro,bind 0 0
|
lxc.mount.entry = /etc/init.d etc/init.d none ro,bind 0 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user