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

/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
Bind to port 22 on 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.
  • 1
    Please paste the output of the following commands: 1) grep <newuser> /etc/passwd 2) grep <newuser> /var/log/secure
    – Sreeraj
    Nov 28, 2014 at 4:53
  • 1
    The output of ssh -v (-vv, -vvv) from client and sshd -d -oUsePrivilegeSeparation=no (-dd, -ddd) on the remote side might also shed some light on your problem.
    – peterph
    Nov 28, 2014 at 10:43
  • Added outputs on grep <newuser> /etc/passwd, grep <newuser> /var/log/secure has a tremendous amount of outputs. .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, 2014 at 4:57
  • @Datsun try /usr/sbin/sshd -d -o ... (see this q about absolute path).
    – muru
    Nov 29, 2014 at 6:02
  • added sudo /usr/sbin/sshd -Dd
    – Datsun
    Nov 29, 2014 at 20:03

2 Answers 2


Perhaps you've forgotten to assign the user's shell?

That can be done like so:

useradd -s /bin/bash gdea73

It may be something different entirely, but I do recall making the aforementioned error myself at some point in the past.

  • Tried this, told me it has already been added.
    – Datsun
    Nov 29, 2014 at 4:56

I fixed it, thanks for your help guys! My issue was that I installed the key on root, and did not do the same for my user. I went ahead and followed the following tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2 But making sure I was on the new user, and in the users home directory, followed ALL steps and it worked! All I had to do was import the keys, and run PuttyGen to change their settings for Putty to work!

Not the answer you're looking for? Browse other questions tagged .