1

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.
Datsun
  • 11

2 Answers2

1

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.

gdea73
  • 46
0

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!

Datsun
  • 11