0

Just created a new user B on CentOS 6.8 and set public key of Ubuntu 16's user A to B's authorized_keys. Works fine. NOT ask password through ssh connection.

After change B's home directory (in /etc/passwd/ : /home/B > /user/B), ask B's password. Try to connect from A to B through SSH and permission is same on /home/B and /user/B.

Is sshd's default root path /home/?

enowy
  • 11
  • 3
  • You didn't change the SELinux labels so the SELinux does not know that he should treat `/user` as `/home`. – Jakuje Jan 19 '17 at 07:33

1 Answers1

1

You didn't change the SELinux labels so the SELinux does not know that he should treat /user as /home. – Jakuje

Thanks a lot! Jakuje. You're right and solved problem.

  1. Open config - vi /etc/sysconfig/selinux
  2. Change value - SELINUX=disabled
  3. System reboot - shutdown -r now
  4. Check user home - cat /etc/passwd
  5. Try to connect with SSH
enowy
  • 11
  • 3