-2

I have created two LXC containers on my host Ubuntu 16.0.4 one is Ubuntu and the other is Centos7 .I am trying to copy file from Centos7 using scp command to Ubuntu as root user it is asking for root password while I entered correct password it’s showing permission denied.May I know the possible reason why I am getting denied?enter image description here

8
  • Do you have SELinux running on the host? Commented Oct 4, 2017 at 9:35
  • 1
    Can root usually SSH to that host? Commented Oct 4, 2017 at 9:40
  • @Kusalananda no I can’t it’s also same getting permission denied Commented Oct 4, 2017 at 9:47
  • @RamanSailopal SElinux is disabled in Centos7 Commented Oct 4, 2017 at 9:47
  • How are you running the containers? nspawn? Commented Oct 4, 2017 at 9:54

1 Answer 1

1

By allowing the root in /etc/ssh/sshd_config (PermitRootLogin Yes), I was able to login.

according to man sshd_config

 PermitRootLogin
         Specifies whether root can log in using ssh(1).  The argument must be “yes”, “prohibit-password”, “without-password”, “forced-commands-only”,
         or “no”.  The default is “prohibit-password”.

note that sshd must be restarted after a change in sshd_config.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.