I checked the /etc/nologin and it was empty but I removed it anyway.
A whereis nologin found another in /usr/sbin/
this was full of hexcode. I removed it without remorse (actually renamed)
Usually the /etc/nologin
file will be empty, but you have to remove it, if non-root user wanted access on ssh server. I think they had intendedly created this file on ready NAS to prevent non-root user from accessing the server
. The people use this file for various purposes, the one I had used it while migrating the old server(users, groups, data, repositories etc) to new server.
You no need to delete/rename /usr/sbin/nologin file.
Still username@nas couldnt log in. This user account was created by the readynas web interface and placed in folder /c/home/username/ but my anotheruser was placed in folder /home/anotheruser/
Removed username and recreated it in the shell. Copied authorized_keys to /home/username/.ssh/authorized_keys
Now this one works as well.
Since I never used NAS I can't say the exact problem that why ssh username@nas was not working, but can guess that there might be permission/ownership issue /c/home/username/ directory.
If your problem is solved now, then mark this thread as solved from thead tools to help others.