Add user and enable SSH2 - can't log in


Well-Known Member
Dec 13, 2003
Here is the desired action/event.

I want to set up a new Centos Box as follows...

To log into shell require that a stand alone non-account user SSH2 into the box and su-. Direct root login not allowed, and password authentication not allowed. Must use public key. I want the stand alone user to be able to FTP as well.

I have been able to add the user and set a password
The user is able to FTP
The user can SSH into the box (on the alternate port) using password authentication when I have Password Authentication Tweak set to Enable Password Auth

HOWEVER I cannot get Public key configured correctly.

So far I have done these steps.

I tried the steps outlined at:

The machine I want to SSH from is my local Windows box.
I have tried using the ssh-keygen command on my server to generate the keypair.
I have also tried using the Create Identity File utility within to SecureCRT to do so.
Created the /home/useradd/.ssh folder and touched a authorized_keys in that folder.
Set the permissions to 700 for the folder and 600 for the file.
Copied the contents of the .pub file created each time to the authorized_keys file.

Attempt to SSH2 to the box via public keys fails in all instances.

** I actually have this set up with an old 'useradd' account. I can put the authorized_keys file from that user's home/.ssh folder into the new 'useradd' home/.ssh folder and SSH2 in public key using the passphrase form the old useradd. I just don't know what I did to set that one up that I am missing now so that I can get this configured on a new box.

If all of that made any sense, please tell me what it is that I am leaving out!


PS please excuse the numerous typos and/or transpositions, I am legally blind! :(


Well-Known Member
Dec 13, 2003
Well it seems the issue is that I was using an old version of SecureCRT that uses a proprietary file structure for the keypair. I downloaded the newest verison of SecureCRT, went through the process of setting up the user and keypair using the OpenSSH format and all worked well. So much for proprietary software!


Product Owner II
Staff member
Nov 14, 2017
Hi @PCZero

I'm glad to see you were able to identify the cause of the issue and resolve it. Thanks for posting your findings here as well.

P.S. I definitely don't think this is something that qualifies as anything but being justifiably concerned so I've modified the title of the thread :)