Article ID: 123424, created on Nov 6, 2014, last review on Jun 17, 2016

  • Applies to:
  • Virtuozzo 6.0


It is impossible to establish ssh connection to newly created container on Ubuntu-14.04 Template


Ssh connection is restricted by default in container ssh configuration file :

# /etc/ssh/sshd_config file | grep PermitRootLogin
# PermitRootLogin without-password

Such behavior is considered as product issue #PCLIN-32429, that is fixed in ubuntu-14.04-x86_64-ez-4.7.0-4 and newer.


  • Update the Ubuntu-14.04 Template to the latest version.

    For information on where to download and how to install the new templates to the Hardware Node, see the following article:

    1450: Where may I download PVC for Linux OS and application templates, and how do I install them?


  • To allow ssh connection for newly created containers on Ubuntu-14.04 you may add the following lines to /vz/template/ubuntu/14.04/x86_64/config/os/default/post-install :

    if [ -f $CFG_FILE ]; then
        cat $CFG_FILE | sed "s,^\(PermitRootLogin\).*,\1 yes," > ${CFG_FILE}.$$
        if [ $? -eq 0 ]; then
            chown --reference=${CFG_FILE} $CFG_FILE.$$ || exit 1 > /dev/null 2>&1
        chmod --reference=${CFG_FILE} $CFG_FILE.$$ || exit 1 > /dev/null 2>&1
  • For existing containers option PermitRootLogin in /etc/ssh/sshd_config should be changed to yes.

c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF