I currently have an issue, what I am trying to do is disable the root login and use ssh
to login as a new user, then su
to root when needed.
I am unable to actually allow the user to login through root. I am able to login through SSH on root, but not the user I have made.
I have used the AllowUser
command, still no luck.
Anything there is to fix this?
I am using CentOS 07.
$ grep <newuser> /etc/passwd
<newuser>:x:1000:1000::/home/<newuser>:/bin/bash]
/usr/sbin/sshd -Dd
debug1: sshd version OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type ECDSA
debug1: private host key: #1 type 3 ECDSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-Dd'
Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.
grep <newuser> /etc/passwd
grep <newuser> /var/log/secure
ssh -v
(-vv
,-vvv
) from client andsshd -d -oUsePrivilegeSeparation=no
(-dd
,-ddd
) on the remote side might also shed some light on your problem. – peterph Nov 28 '14 at 10:43.ssh -V told me I'm running OpenSSH, and OpenSSL, while sshd -D told me sshd re-exec requires execution with an absolute path
– Datsun Nov 29 '14 at 04:57/usr/sbin/sshd -d -o ...
(see this q about absolute path). – muru Nov 29 '14 at 06:02ssh -vv user@server.example.com
. – Gilles 'SO- stop being evil' Nov 29 '14 at 20:34/etc/passwd
really end with/bin/bash]
? If so, that's your problem: remove the]
. – Gilles 'SO- stop being evil' Nov 29 '14 at 20:36