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?
Asked
Active
Viewed 2,952 times
-2
naveen8577
- 21
- 1
- 2
- 7
-
Do you have SELinux running on the host? – Raman Sailopal Oct 04 '17 at 09:35
-
1Can root usually SSH to that host? – Kusalananda Oct 04 '17 at 09:40
-
@Kusalananda no I can’t it’s also same getting permission denied – naveen8577 Oct 04 '17 at 09:47
-
@RamanSailopal SElinux is disabled in Centos7 – naveen8577 Oct 04 '17 at 09:47
-
How are you running the containers? nspawn? – Raman Sailopal Oct 04 '17 at 09:54
-
is root allowed in remote `/etc/ssh/sshd_config` (`PermitRootLogin Yes`) ? – Archemar Oct 04 '17 at 09:54
-
@Archemar Thanks for your answer it works – naveen8577 Oct 04 '17 at 10:06
-
@RamanSailopal LXC – naveen8577 Oct 04 '17 at 10:07
1 Answers
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.
Archemar
- 31,183
- 18
- 69
- 104
naveen8577
- 21
- 1
- 2
- 7